The man accused of fatally shooting and stabbing a fellow Purdue University student inside of a classroom earlier this year pleaded guilty to murder on Thursday.

On Jan. 21, 24-year-old Cody Cousins of Warsaw, Indiana, attacked and killed 21-year-old Andrew Boldt of West Bend, Wisconsin, inside of a classroom in the university's Electrical Engineering Building on campus.

Since then, he has been sitting in jail without bond.

Cousins pleaded guilty before Tippecanoe County court hearing in Lafayette on Thursday morning. He also told Tippecanoe Superior Court Judge Thomas Busch that he was on medication for schizophrenia.

Cousins' defense attorney, Kirk Freeman, filed a formal notice in May noting his intention to use an insanity defense.

The court will also allow Cousins to undergo a mental evaluation.

According to Tippecanoe Superior Court bailiff Brenda Rody, Cousins' mental state will be decided by the judge during a sentencing hearing that is scheduled for Sept. 19, reports The Associated Press.

Back in January, Cousins originally entered a preliminary plea of not guilty. He later asked for a different venue and new legal representation.

The Lafayette Journal & Courier reports that the murder was premeditated and that Cousins intended to kill Boldt when he entered the classroom that day.

After deciding to plead guilty, he had to answer several questions, according to CBS affiliate WLFI. For example, when asked if he went to Purdue's campus on Jan. 21 to find and kill Boldt, he replied saying "yes." However, he did not disclose his motive for the killing.

Both young men were electrical engineering students at the time of the slaying.

Cousins is facing between 45 and 65 years in prison, according to the newspaper.

However, if he is declared mentally ill, he will receive mental health treatment while serving out his prison term.