1. Engineering
  2. Computer Science
  3. deliverables appjava studentjava and groupjava as requested below students should...

Question: deliverables appjava studentjava and groupjava as requested below students should...

Question details

Deliverables

  1. app.java, student.java, and group.java as requested below.

  1. Students should apply consistent indenting in all submissions. This can be done via the NetBeans Source menu.

Contents app student First name Last name group 1- creates 4 student objects 2- create a group object g1 using these 4 students 3- Using the group object g1 (instance, variable) in app.java name member 1 member 2 member 3 member 4 GPA 3.1- Display the group name,and information about each student in the group getlnfo() semesterGPA() 3.2-Display the group average GPA getlnfo() averageGPA) 3.3-Display the semesterGPA of the third student in the group (retrieving information from the student class variables in the group, not from student variables in app) 4- create 4 new student objects (different from the previous 4 used to create gl) 5- create a group object g2 using these 4 students 6-repeat step #3 for the second group object g2

****Create a project that:*******

  • Has a student class
    • Build upon the solutions of the previous labs (e.g., using app.java and student.java)
    • You will need a version of student.java that has a working semesterGPA( ) method as specified in the last assignment
      • Very important:
        • For this lab it is important that you run semesterGPA() just once.
        • When semesterGPA() is executed, it should update the GPA attribute
        • Again, for this lab it is necessary that the student GPA is calculated just once. Otherwise, the group average GPA will never match with the displayed values because of the randomness in semesterGPA
        • When should you run semesterGPA then?
          • Running it in the constructor seems a good choice
  • Has a group class
    • group has a name
    • group has 4 students
    • group has at least 2 methods
      • A method that displays the group name and the name of each student in the group
      • A method that calculates and displays the average GPA of a group. Group average GPA is the average of all the group members' (students') GPA.
        • group GPA starts in student using the student GPA attribute.
        • For instance, we may have:
          • student #1, John, with a semesterGPA of 3.2;
          • student #2, Mary, with a semesterGPA of 3.5;
          • student #3, Emily, with a semesterGPA of 3.0, and
          • student #4, Peter, with a semesterGPA of 2.5,
          • which will give a group average GPA of (3.2 + 3.5 + 3.0 + 2.5)/4 = 3.05.
  • in app.java (the class with the main method)
    • Create 4 student objects
    • Create a group object g1 using the 4 student objects above
    • Using the group object (instance, variable) in app.java:
      • Display the group name, and information about each student in the group
      • Display the group average GPA
      • Display the semesterGPA of the third student in the group (retrieving information from the student class variables in the group, not from student variables in the app).
      • Pay attention, you have to use the group object (instance, variable) in app.java
        • Something like System.out.println(g1.______________);
    • Repeat the same process for another group object g2.
Solution by an expert tutor
Blurred Solution
This question has been solved
Subscribe to see this solution