ITEC 120 LAB 11 | Back to Lab index page |
Student
You will write Java class for a Student.
Student
|
- name : String |
+ Student (String studentname) |
Write a driver program which asks the user for the student's name and constructs a student with that name. Then, ask the user for 3 test scores, and set the 3 test scores with the setTest method. Call the aveTests method for the student, and print the student out.
A sample run will look like this:
Program outputs: | Please enter a student name: |
User inputs: | Bugs Bunny |
Program outputs: |
Please enter test score 1 for Bugs Bunny: |
User inputs: | 87 |
Program outputs: |
Please enter test score 2 for Bugs Bunny: |
User inputs: | 78 |
Program outputs: |
Please enter test score 3 for Bugs Bunny: |
User inputs: | 92 |
Program outputs: |
Bugs Bunny |
Once you have your program
working, show your lab to the Peer Instructor to be checked off.