In CPP , Write a program that: Defines an enum named Classification. The enum Classification will have 2 data values: undergraduate, graduate. Defines an enum named Status. The enum Stutus will have 2 data values: parttime, fulltime. Defines an enum named Residency. The enum Residency will have 2 data values: resident, international. Defines a student name variable. Creates a Classification, Status, and Residency, credit hour, cost per credit hour, and tuition variable. Reads the value of the Classification, Status, and Residency, student name and credit hour variable from the user. If the student is a fulltime undergraduate resident student, tuition is credit hour times 345.00 If the student is a fulltime undergraduate international student, tuition is credit hour times 685.00 If the student is a fulltime graduate resident student, tuition is credit hour times 545.00 If the student is a fulltime graduate international student , tuition is credit hour times 885.00 If the student is a parttime undergraduate resident student, credit hours must be less than 12, tuition is credit hour times 345.00 If the student is a parttime undergraduate international student, credit hours must be less than 12, tuition is credit hour times 685.00 If the student is a parttime graduate resident student, credit hours must be less than 6, tuition is credit hour times 545.00 If the student is a parttime graduate international student , credit hours must be less than 6, tuition is credit hour times 885.00 Prints student name, classification, stutus, residency, credit hours and tuition of the student. Please make sure that the Creates a Classification, Status, and Residency, credit hour, cost per credit hour, and tuition variable. Reads the value of the Classification, Status, and Residency, student name and credit hour variable from the user. works. Thank you
In CPP ,
Write a program that:
Defines an enum named Classification. The enum Classification will have 2 data values: undergraduate, graduate.
Defines an enum named Status. The enum Stutus will have 2 data values: parttime, fulltime.
Defines an enum named Residency. The enum Residency will have 2 data values: resident, international.
Defines a student name variable.
Creates a Classification, Status, and Residency, credit hour, cost per credit hour, and tuition variable.
Reads the value of the Classification, Status, and Residency, student name and credit hour variable from the user.
If the student is a fulltime undergraduate resident student, tuition is credit hour times 345.00
If the student is a fulltime undergraduate international student, tuition is credit hour times 685.00
If the student is a fulltime graduate resident student, tuition is credit hour times 545.00
If the student is a fulltime graduate international student , tuition is credit hour times 885.00
If the student is a parttime undergraduate resident student, credit hours must be less than 12, tuition is credit hour times 345.00
If the student is a parttime undergraduate international student, credit hours must be less than 12, tuition is credit hour times 685.00
If the student is a parttime graduate resident student, credit hours must be less than 6, tuition is credit hour times 545.00
If the student is a parttime graduate international student , credit hours must be less than 6, tuition is credit hour times 885.00
Prints student name, classification, stutus, residency, credit hours and tuition of the student.
Please make sure that the
Creates a Classification, Status, and Residency, credit hour, cost per credit hour, and tuition variable.
Reads the value of the Classification, Status, and Residency, student name and credit hour variable from the user.
works. Thank you
Here I have created 3 different enums.
Next, in the main method, I have taken input from the user and set the value for each enum variable based on the choice entered by the user.
Next, I have used nested if-else block to get the cost per hour based on the user input.
Then, I have calculated the tuition value.
In the end, I have printed the result to the console.
Trending now
This is a popular solution!
Step by step
Solved in 2 steps with 1 images