|
|
Java Student Project |
||
|
|||
Student |
|||
|
|
|
||
| Ability Level: | Intermediate | ||
|
|
|
||
| Estimated Time: | 50 minutes | ||
|
|
|
||
| Objectives: |
|
||
|
|
|
||
| Materials & Resources: |
|
||
|
|
|
||
| Overview: | Create
a Student class that includes the student’s name and grade
point average. Include an output method. Create
a subclass for matriculated students that also outputs the
student’s major. Create a program that demonstrates
both of these classes. |
||
|
|
|
||
| Instructions: | See the notes in overview above. | ||
|
|
|
||
| Hints: | Some important
points to keep in mind in doing this project:
You can place and indent the if following an else, but a program with many nested if…else combinations soon grows very long and “deep,” and with indentations, later statements in the nest would move farther and farther to the right on the page. For easier-to-read code, Java programmers constantly place each else and it’s subsequent if on the same line.
Sample Code:
|
||