//Adam Kovacs
//10/19/17
import java.net.*;
import java.io.*;
import java.util.StringTokenizer;
import java.util.Scanner;
public class StudentStarter
{
public StudentStarter()
{
Scanner sc = new Scanner(System.in);
System.out.println("Enter Graduation year");
int gradyear = sc.nextInt();
String Chapel = "";
Students stud = new Students(gradyear);
}
}
public class Students
{
public Students(int gradyear)
{
if(gradyear > 2021){
MiddleSchoolStudents mid = new MiddleSchoolStudents();
}
else{
UpperSchoolStudents up = new UpperSchoolStudents();
}
}
public Students() {
}
}
public class MiddleSchoolStudents
{
public MiddleSchoolStudents()
{
super();
System.out.println("Chapel even days, lunch at noon");
}
}
public class UpperSchoolStudents extends Students
{
public UpperSchoolStudents()
{
super();
System.out.println("Chapel odd days, lunch at 11:00");
}
}
Be the first to comment
You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.