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 12:00
The following function returns a string of length n whose characters are all 'x'. give the order of growth (as a function of n) of the running time. recall that concatenating two strings in java takes time proportional to the sum of their lengths. public static string f(int n) { if (n == 0) return ""; if (n == 1) return "x"; return f(n/2) + f(n - n/2); } options: a) constant b) logarithmic c) linear d) linearithmic e)quadratic f)cubic g) exponential
Answers: 2
question
Computers and Technology, 24.06.2019 14:00
What are the different components of the cloud architecture?
Answers: 2
question
Computers and Technology, 24.06.2019 16:30
The database design steps are listed below in the incorrect order. choose the correct order number next to each step. determine the information to be stored in the database. determine the fields needed to record the data determine if there will be any repetition of data entered, and separate the fields into tables to normalize the data. create relationships to connect the tables.
Answers: 3
question
Computers and Technology, 25.06.2019 05:10
Write a program that asks for 'name' from the user and then asks for a number and stores the two in a dictionary (called 'the_dict') as key-value pair. the program then asks if the user wants to enter more data (more data (y/n)? ) and depending on user choice, either asks for another name-number pair or exits and stores the dictionary key, values in a list of tuples and prints the list. note: ignore the case where the name is already in the dictionary. example: name: pranshu number: 517-244-2426 more data (y/n)? y name: rich number: 517-842-5425 more data (y/n)? y name: alireza number: 517-432-5224 more data (y/n)? n [('alireza', '517-432-5224'), ('pranshu', '517-244-2426'), ('rich', '517-842-5425')]
Answers: 3
You know the right answer?
Write the program StudentGradeDemo that attempts to create several valid and invalid ReportCard obje...
Questions
question
Chemistry, 07.01.2021 23:10
question
Mathematics, 07.01.2021 23:10
Questions on the website: 13722365