repl.it
@TMDUBS/

Student Project

Java

No description

fork
loading
Files
  • Main.java
  • Instructions
  • Student.java
Main.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
class Main {
  	public static void main(String[] args){
    	Student hector = new Student("Hector", 11, 3.0, "boy", "He", "his");
    	System.out.println("Student Name: " + hector.name);
    	System.out.println("Student Grade: " + hector.grade);
    	System.out.println("Student GPA: " + hector.gpa);
    	
    	System.out.println("Changing GPA...");
    	hector.changeGPA(3.5);
    	
    	System.out.println("Student's New GPA: " + hector.gpa);
    	
    	
    	if(hector.failed == false){
        System.out.println("Student graduated!");
      }
      else{
        System.out.println("Student did not graduate");
      }
    	hector.graduate();
    	System.out.println("Currently in grade: " + hector.grade);
    	
    	hector.checkUniform(false);
    	hector.checkUniform(false);
    	hector.checkUniform(false);
    	hector.checkUniform(false);
    	System.out.println(hector.name + " went a few days without uniform..");
    	System.out.println(hector.daysWithoutUniform + " days, to be exact.");
    	
    	System.out.println(hector.getPronoun1() + " is wearing " + hector.getPronoun2() + " uniform today!");
    	hector.checkUniform(true);
    	System.out.println("Current days without uniform for " + hector.name + ": " + hector.daysWithoutUniform);
  	}
}
?