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, 22.06.2019 03:30
Which group on the home tab allows you to add shapes to a powerpoint slide?
Answers: 1
question
Computers and Technology, 22.06.2019 15:00
This is not a factor that you should use to determine the content of your presentation. your audience your goals your purpose your technology
Answers: 1
question
Computers and Technology, 22.06.2019 15:30
When creating a budget, log fixed expenses before income. after income. after savings. at the top.
Answers: 1
question
Computers and Technology, 23.06.2019 10:20
Suppose there is a relation r(a, b, c) with a b+-tree index with search keys (a, b).1. what is the worst-case cost of finding records satisfying 10 < a < 50 using this index, in terms of the number of records n1, retrieved and the height h of the tree? 2. what is the worst-case cost of finding records satisfying 10 < a < 50 and 5 < b < 10 using this index, in terms of the number of records n2 that satisfy this selection, as well as n1 and h defined above? 3. under what conditions on n1 and n2, would the index be an efficient way of finding records satisfying the condition from part (2)?
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
Arts, 15.06.2021 23:10
question
Arts, 15.06.2021 23:10
question
Arts, 15.06.2021 23:10
question
English, 15.06.2021 23:10
Questions on the website: 13722367