LAFAYETTE, Ind. — A Purdue University student accused in the shooting of a fellow student in a classroom was formally charged with murder on Thursday.

The Tippecanoe County prosecutor's office filed the charge against Cody Cousins, 23, shortly before a scheduled initial court hearing.

The court documents say 21-year-old Andrew Boldt of West Bend, Wis., suffered both gunshot and knife wounds when he was fatally attacked shortly before 12:30 p.m. Tuesday in Purdue's Electrical Engineering Building.

The charging document says several other people were in the classroom and witnessed the attack, but it doesn't give a possible motive.

Police say when an officer arrived, he spotted Cousins sitting on the ground outside the building with his hands behind his head. The officer said Cousins, who has addresses in Warsaw, Ind., and Centerville, Ohio, had blood on his hands and clothes.

Cousins was arrested without incident.

Officers found a knife and handgun on the ground, along with some spent shell casings. Police said there were bloody footprints on the floor outside the room where the shooting took place.

Police have said Cousins targeted Boldt, but haven't disclosed why or how the two might have known each other. Both Cousins and Boldt were seniors, and police identified Boldt as a teaching assistant. Documents posted on the engineering school's website also listed Cousins as a teaching assistant.

Boldt's funeral is scheduled for Tuesday in his hometown of West Bend, Wis. The visitation will be Tuesday afternoon at Saint Frances Cabrini Church, followed by a funeral Mass that night. Friends from Purdue, as well as his former classmates from Marquette University High School in Milwaukee, are invited to attend, as are members of the local community.

Pastor Nathan Reesman says Boldt's family members continue to request that their privacy be respected. He also asks that media not attend the visitation and funeral.