I want to design a method that calculates the cost of a semesters tuition for a college student at Mid-State University. Variables include whether the student is an in-state resident (I for in-state, or O for out-of-state) and the number of credit hours for which the student is enrolling. The method should throw an exception if the residency code is invalid. Tuition is $75 per credit hour for in-state students and $125 per credit hour for out-of-state students. If a student enrolls in six hours or fewer, there is an additional $100 surcharge. Any student enrolled in 19 hours or more pays only the rate for 18 credit hours.
0 · ·