Question: in Java Your program is to write loops that asks the user to enter information relating to a course they are currently taking - ask

 in Java Your program is to write loops that asks the

in Java

Your program is to write loops that asks the user to enter information relating to a course they are currently taking - ask for the course number, department name, the number of times it meets in a week, the time the class starts, the instructor name, and the number of students. For each item, check to make sure that what the user enters is actually of the correct type, and if not, use an infinite loop to ask again. So if an integer needs to be entered, make sure an integer is entered, and loop until one actually is. Use next() to remove unwanted words when users do not type in a word of the correct type. When a user types in an unwanted word (e.g. the wrong type) print an error message saying that you need input of integer type or string type, etc

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!