Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Assume that credits is an int variable whose value is 0 or positive. Write an ex

ID: 3532111 • Letter: A

Question

Assume that credits is an int variable whose value is 0 or positive. Write an expression whose value is "freshman" or "sophomore" or "junior" or "senior" based on the value of credits. In particular: if the value of credits is less than 30 the expression 's value is "freshman"; 30-59 would be a "sophomore", 60-89 would be "junior" and 90 or more would be a "senior".

This is in JAVA!!!

This is my Code and i get an error doing so:

(credits <= 30) ? "freshman":

(credits >= 30) && (credits <= 59) ? "sophomore":

(credits >= 60) && (credits <= 89) ? "junior":

(credits >= 90) ? "senior":

Explanation / Answer

what u don is correct but forget to keep ; at end(after senior) (credits = 30) && (credits = 60) && (credits = 90) ? "senior";