subject

Write the program StudentGradeDemo that attempts to create several valid and invalid ReportCard objects. Immediately after each instantiation attempt, handle any thrown exceptions by displaying an error message. Create a ReportCard class with four fields for a student name, a numeric midterm grade, a numeric final exam grade, and letter grade. The ReportCard constructor requires values for the name and two numeric grades and determines the letter grade. Upon construction, throw an ArgumentException if the midterm or final exam grade is less than 0 or more than 100. The letter grade is based on the arithmetic average of the midterm and final exams using a grading scale of A for an average of 90 to 100, B for 80 to 90, C for 70 to 80, D for 60 to 70, and F for an average below 60. Display all the data if the instantiation is successful. Use the Main() method to test your code.

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 00:30
Advantages and disadvantages of binary system
Answers: 1
question
Computers and Technology, 22.06.2019 18:30
Which of the following commands is more recommended while creating a bot?
Answers: 1
question
Computers and Technology, 22.06.2019 21:50
Given int variables k and total that have already been declared, use a while loop to compute the sum of the squares of the first 50 counting numbers, and store this value in total. thus your code should put 11 + 22 + 33 + + 4949 + 50*50 into total. use no variables other than k and total.
Answers: 2
question
Computers and Technology, 23.06.2019 00:30
Quick pl which one of the following is considered a peripheral? a software b mouse c usb connector d motherboard
Answers: 1
You know the right answer?
Write the program StudentGradeDemo that attempts to create several valid and invalid ReportCard obje...
Questions
Questions on the website: 13722362