Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ****************************************************************
- // 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 average, and return a string containing student’s info.
- // ****************************************************************
- public class Student {
- // declare instance data
- // -----------------------------------------------
- // constructor
- // -----------------------------------------------
- // create a constructor that takes in the student name as a parameter
- // add body of constructor
- // -----------------------------------------------
- // inputGrades: pass in grades 1 and 2 into this method.
- // -----------------------------------------------
- // create method for the input grades method
- // add body of inputGrades
- // -----------------------------------------------
- // getAverage: compute and return the student's test average
- // -----------------------------------------------
- // add header for getAverage
- {
- // add body of getAverage
- }
- // -----------------------------------------------
- // getName: print the student's name
- // -----------------------------------------------
- // add header for printName
- {
- // add body of printName
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment