Answered step by step
Verified Expert Solution
Question
1 Approved Answer
This problem is asking for me to design a class that will calculate a students grade. There needs to be JUnit test to test the
This problem is asking for me to design a class that will calculate a students grade. There needs to be JUnit test to test the methods work correctly.
For each method in the class specification: Pre-conditions: these are things that must be true when the method starts. They are generally rules about the parameters (what values they can have) and about the state of the system (what data has been stored where). In this assignment, specifying what the parameters are is a sufficient specification of pre-conditions. Post-conditions: specifications of how the state of the system has changed as a result of the method running. These are generally specifications of the return value and how the algorithm may have changed any data stored in the system. JUnit Tests: You need to test that a method preforms correctly. For getters and setters this can usually be handled with a test of a single value. The more situations that can occur (border tests, empty vs. partially full vs full array, etc...) the more tests you should have. - - In addition to the methods you need to have a proposed way to store the class information. For each instance variable you need to specify it's type and what information it is holding. Overview of the Class Maintains the grades for one student of CS1. A student's record consists of the following: labs - Up to 4 labs grades quizzes - Up to 4 quizzes of which the lowest score will be dropped (unless there is only one quiz grade) three exams There needs to be a way to add grades as well as make changes to grades that have already been added. All records should start off empty The class needs to be able to compute the final grade for a student using the information provided. If there are no grades of a specific type (e.g. labs) then the student is assumed to have earned a 0 for that grade group. The final grade is calculated as a weighted average of these components 30% of the average of the labs 25% of the average of the quizzes after the lowest quiz grade has been dropped 15% for each exam. *Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started