subject

Part 1. Create a class GradedActivity that has two attributes: score and weight (both doubles). Supply a constructor that allows one to set both the score and weight, AND one that allows one to set just the weight (in which case the score defaults to 0). Provide get and set methods: enforce the restriction that the grade must be between 0 and 100 (inclusive) and the weight must be between 0 and 1 (exclusive); if either is not within range, throw an exception. In addition supply a toString method and a method, getGrade( ) that returns a char: A, B, C, D, F; use the usual meaning of these grades and round up any grades that are nn.5 or higher.

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 08:40
What are the three parts to physical security standards for various types of army equipment and the risk level
Answers: 2
question
Computers and Technology, 22.06.2019 23:20
How can you tell if someone sent you a text message to your email instead of a email
Answers: 1
question
Computers and Technology, 23.06.2019 19:30
You can apply several different worksheet themes from which tab?
Answers: 1
question
Computers and Technology, 23.06.2019 21:00
Will this setup result in what kathy wants to print?
Answers: 2
You know the right answer?
Part 1. Create a class GradedActivity that has two attributes: score and weight (both doubles). Supp...
Questions
question
Mathematics, 10.06.2020 21:57
question
Mathematics, 10.06.2020 21:57
question
Mathematics, 10.06.2020 21:57
question
Mathematics, 10.06.2020 21:57
Questions on the website: 13722361