Advertisement
Guest User

Untitled

a guest
Jun 26th, 2017
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.01 KB | None | 0 0
  1. // APCS1 Lab Test 2
  2. //
  3. // Prog07.java
  4. //
  5. // Student Class
  6. //
  7. // Points: 3
  8. //
  9. ////////////////////////////////////////////////////////////////////////////////
  10. // Complete the Student class in the file Student.java which will allow this
  11. // program to execute.
  12. //
  13. // DO NOT ALTER THIS FILE IN ANY WAY !!!!!!!
  14.  
  15.  
  16. public class Prog07
  17. {
  18. public static void main (String args[])
  19. {
  20. Student stu1 = new Student();
  21. Student stu2 = new Student("Mariana Belle Garcia", 28, 4.0);
  22.  
  23. System.out.println("Information for stu1");
  24. System.out.println("====================");
  25. System.out.println("Name: "+stu1.getName());
  26. System.out.println("Age: "+stu1.getAge());
  27. System.out.println("GPA: "+stu1.getGPA());
  28. System.out.println();
  29. System.out.println("Information for stu2");
  30. System.out.println("====================");
  31. System.out.println("Name: "+stu2.getName());
  32. System.out.println("Age: "+stu2.getAge());
  33. System.out.println("GPA: "+stu2.getGPA());
  34. System.out.println();
  35. }
  36. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement