Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Write a class called MonitoredStudent This class handles a special student who is currently on Academic Probation. MonitoredStudent is a subclass of Student. The class
- Write a class called MonitoredStudent
- This class handles a special student who is currently on Academic Probation.
- MonitoredStudent is a subclass of Student.
- The class has 1 Instance variables, an int called minPassingAvg that stores an integer of the minimum average grade required for the student to be removed from Academic Probation.
- Constructor
- Default constructor that sets the instance fields to a default value, remember to pass the appropriate values to the super class.
- Parameterized constructor that sets the instance field to a parameter value, remember to pass the appropriate values to the super class.
- Methods
- setMinPassingAvg - sets or changes the minPassingAvg by taking in a parameter
- getMinPassingAvg - returns the minPassingAvg of the student
- isOffProbation()
- returns true if students quiz average is greater than or equal to the minPassingAvg.
- returns false if students quiz average is lessthan the minPassingAvg.
- Write another class that will test our MonitoredStudent class called MonitoredStudentTester
- Remember since MonitorStudent is also a Student object, you need to prompt from much of the same information as Lab 2.
- Prompt for the minimum Passing average.
- Create a MonitoredStudent object
- As we did in Lab 2: Create a loop that
- Asks user for a quiz score
- Adds that score to the MonitoredStudent object
- Ask the user if they are finished entering scores
- Use the methods of the class to print out the student's name, total score and average quiz score in a nicely formatted output where the score is rounded to 2 decimal place. (Hint use printf)
- Use the methods in the class to print out a message that indicates if the student is off probation.
- Include Javadoc for all classes, method and instance variables
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