subject

Each student will be described by three pieces of data: his/her name, his/her score on test #1, and his/her score on test #2. There will be one constructor, which will have one argument (parameter)-the name of the 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.

//
// Grades. java
//
// Use Student class to get test grades for two students
// and compute averages
// Name:
// Date:
//
//
public class Grades
{
public static void main(String[] args)
{
System. out. println("Welcome to Mrs. Van Slyke’s APCSA class.");

Student student1 = new Student("Tonia");
//create student2, "Theo"

//input grades for Tonia
//print average for Tonia

System. out. println();

//input grades for Theo
//print average for Theo

}
}

//
// Student. java
//
// Define a student class that stores name, score on test 1, and
// score on test 2. Methods prompt for and read in grades,
// compute the test average, and returns a string containing student’s info.
//
// Name:
// Date:
//
import java. util. Scanner;

public class Student
{
//declare instance data

//
//constructor
//
public Student(String studentName)
{
//add body of constructor

}

//
//inputGrades: prompt for and read in student's grades for test1 and test2.
//Use name in prompts, e. g. "Please enter Rebecca's score for test1 in APCSA".
//
public void inputGrades()
{
//add body of inputGrades

}

//
//getAverage: compute and return the student's test average
//

//add header for getAverage

{
//add body of getAverage

}

//
//getName: get the student's name
//

//add header for getName

{
//add body of getName

}

//
//toString: set up toString to return
//name:, test1 score:, test2 score:
//

//add header for toString

{
//add body of toString

}

}

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 14:30
Select the correct answer. andy received a potentially infected email that was advertising products. andy is at risk of which type of security threat? a. spoofing b. sniffing c. spamming d. phishing e. typo-squatting
Answers: 2
question
Computers and Technology, 24.06.2019 03:00
What is one potential problem associated with an organization purchasing new technology early in its lifecycle
Answers: 1
question
Computers and Technology, 24.06.2019 14:00
Which describes careers that have similar education requirements but different qualifications? product safety engineers and materials engineers industrial safety engineers and industrial health engineers quality control systems managers and inspectors industrial safety and health engineers and hand packers
Answers: 3
question
Computers and Technology, 25.06.2019 09:30
An output peripheral interacts with or sends data to the computer provides information to the user from the computer receives data from the computer and sends it to a modem stores data processed by the computer
Answers: 1
You know the right answer?
Each student will be described by three pieces of data: his/her name, his/her score on test #1, and...
Questions
question
Social Studies, 03.11.2019 11:31
Questions on the website: 13722367