repl.it
@Doovid/

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
35
36
37
38
39
40
41
42
class Main {
  	public static void main(String[] args){
    	Student hector = new Student("Hector",11,3.0);
    	System.out.println("Student Name: " + hector.name);
    	System.out.println("Student Grade: " + hector.grade);
    	System.out.println("Student GPA: " + hector.gpa);
      System.out.println("Student academic grades: " + hector.grades);
    	
    	System.out.println("Changing GPA...");
    	hector.changeGPA(3.5);
    	
    	System.out.println("Student's New GPA: " + hector.gpa);
    	
    	//uncomment the following when you've written the other tests
    	//you can uncomment by highlighting text and hitting CMD+/
    	
    	 System.out.println("Student graduated!");
    	 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("He/she is wearing his/her uniform today!");
    	 hector.checkUniform(true);
    	 System.out.println("Current days without uniform for " + hector.name + ": " + hector.daysWithoutUniform);

       System.out.println(hector.name + " grades is currently: " + hector.grades);
       System.out.println("Changing GPA...");
       hector.changeGPA(4.0);

       System.out.println("Student's New GPA: " + hector.gpa);

       System.out.println("Student's number of pencils: " + hector.numberOfPencils);
       hector.teacherName(true);
       System.out.println("His teacher is currently " + hector.nameOfTeacher);
  	}
}
Fetching token
?