Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

. Tracking Grades A teacher wants a program to keep track of grades for students and decides to create a student class for his program

image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
. Tracking Grades A teacher wants a program to keep track of grades for students and decides to create a student class for his program as follows . Each student will be described by three pieces of data: his/her name, his/her score on test # 1, and hisher score on test#2. There will be one constructor, which will have one argument-the name ofthe student There will be three methods: getName, which will return the student's name inputGrades, which will prompt for and read in the student's test grades; and getAverage, which will compute and return the student's average File Student.java contains an incomplete definition for the Student class. Save it to your directory and complete the class definition as follows a. Declare the instance data (name, score for testl, and score for test2) b. Create a Scanner object for reading in the scores. c. Add the missing method headers d. Add the missing method bodies. File Grades java contains a shell program that declares two Student objects. Save it to your directory and use the inputGrades method to read in each student s test scores, then use the getAverage method to find their average. Print the average with the student's name, eg. The average for Joe is 87. You can use the get Name method to print the student's name. 3. Add statements to your Grades program that print the values of your Student objects directly, e.g: System.out printin("Student 1: + studentl) This should compile, but notice what it does when you run it nothing very useful! When an object is printed, Java looks for a roString method for that object. This method must have no

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Concepts International Edition

Authors: David M. Kroenke

6th Edition International Edition

0133098222, 978-0133098228

More Books

Students also viewed these Databases questions

Question

l identify the stages of conflict

Answered: 1 week ago

Question

Brief the importance of span of control and its concepts.

Answered: 1 week ago

Question

What is meant by decentralisation?

Answered: 1 week ago