Session 14

Source Code

import java.util.*;

public class Week14 {
    public static void main(String[] args) {
        String myName = ""; // add your name
        System.out.println("Week 14" + " - " + myName);

        // Menu
        System.out.println("Menu");
        System.out.println("E1 - Example 1");

        // setup Scanner
        Scanner in = new Scanner(System.in);
        System.out.print("Choice: ");
        String choice = in.nextLine();

        // switch choices
        switch (choice) {
            case "E1":
                System.out.println("Example 1");
                example1();
                break;
            case "E2":
                System.out.println("Example 2");
                example2();
                break;
            case "E3":
                System.out.println("Example 3");
                example3();
                break;
            case "E4":
                System.out.println("Example 4");
                example4();
                break;

        }
    }

    // example1 method
    public static void example1() {
        // create CollegeStudent object
        
        // call methods
        
    }

    // example2 method
    public static void example2() {
        // create CollegeStudent object
        

    }

    // example3 method
    public static void example3() {
        // create CollegeStudent object
        
    }

    // example4 method
    public static void example4() {
        // create two high school students
        
        // call printStudentCounter method
        

    }

}

CollegeStudent.java

Athlete.java

HighSchoolStudent.java

SchoolMember.java

Scoreboard.java

Last updated

Was this helpful?