The goal for Lab06b is to use the provided Student class (ATTACHED IN IMAGE) and create an array of Student objects that are stored in a School object. This program uses a Student class that is provided and shown below. The class is placed in its own separate file and should not be altered. This program sequence started with Lab06a. It is a reminder that it is the same Student file used by Lab06a. This lab will add data processing to the earlier Lab06a. This program will continue with the Lab06b program that performs some data processing on the Student records. For this lab 10 Student objects need to be constructed and placed in a students array, which is stored in a School object. You actually did this already for Lab06a. You also need to complete the School constructor, addData method and toString Method, which were in Lab06a.  Feel free to just copy them over. You need to complete three bubbleSort methods; one that sorts according to the student gpa., one for age and one for name.     Example output: Laba Tom  21  1.685  Ann  34  3.875  Bob  18  2.5  Jan   45  4.0  Joe   27  2.975  Sue   19  3.225  Jay   30  3.65  Meg  38  2.0  Art    40  3.999  Deb  35  2.125      Name: Ann  34 3.875  Art   40  3.999  Bob  18  2.5  Deb  35  2.125  Jan   45  4.0  Jay   30  3.65  Joe   27  2.975  Meg  38  2.0  Sue   19  3.225  Tom  21  1.685   Age: Bob  18  2.5  Sue 19  3.225  Tom 21  1.685  Joe  27  2.975  Jay  30  3.65  Ann 34  3.875  Deb 35  2.125  Meg 38  2.0  Art  40  3.999  Jan  45  4.0   GPA: Tom 21 1.685 Meg 38 2.0 Deb 35 2.125 Bob 18 2.5 Joe 27 2.975 Sue 19 3.225 Jay 30 3.65 Ann 34 3.875 Art 40 3.999 Jan 45 4.0

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

The goal for Lab06b is to use the provided Student class (ATTACHED IN IMAGE) and create an array of Student objects that are stored in a School object. This program uses a Student class that is provided and shown below. The class is placed in its own separate file and should not be altered. This program sequence started with Lab06a. It is a reminder that it is the same Student file used by Lab06a. This lab will add data processing to the earlier Lab06a.

This program will continue with the Lab06b program that performs some data processing on the Student records. For this lab 10 Student objects need to be constructed and placed in a students array, which is stored in a School object. You actually did this already for Lab06a. You also need to complete the School constructor, addData method and toString Method, which were in Lab06a.  Feel free to just copy them over. You need to complete three bubbleSort methods; one that sorts according to the student gpa., one for age and one for name.  

 

Example output:

Laba

Tom  21  1.685
 Ann  34  3.875
 Bob  18  2.5
 Jan   45  4.0
 Joe   27  2.975
 Sue   19  3.225
 Jay   30  3.65
 Meg  38  2.0
 Art    40  3.999
 Deb  35  2.125   

 

Name:

Ann  34 3.875
 Art   40  3.999
 Bob  18  2.5
 Deb  35  2.125
 Jan   45  4.0
 Jay   30  3.65
 Joe   27  2.975
 Meg  38  2.0
 Sue   19  3.225
 Tom  21  1.685

 

Age:

Bob  18  2.5
 Sue 19  3.225
 Tom 21  1.685
 Joe  27  2.975
 Jay  30  3.65
 Ann 34  3.875
 Deb 35  2.125
 Meg 38  2.0
 Art  40  3.999
 Jan  45  4.0

 

GPA:

Tom 21 1.685 Meg 38 2.0 Deb 35 2.125 Bob 18 2.5 Joe 27 2.975 Sue 19 3.225 Jay 30 3.65 Ann 34 3.875 Art 40 3.999 Jan 45 4.0

1
AWNA
2
3
4
5
6
7
CHIENENGGANZE2222
8
9
10
11
12
13
14
15
16
17
18
19
20
21
23
24
25
26
27
// Student.java
// Used by the Lab06 and Lab07 Assignments.
public class Student
{
}
private String name;
private int age;
private double gpa;
public Student (String n, int a, double g)
{
}
name = n;
age = a;
gpa g;
=
public String getName() { return name; }
public int getAge() { return age; }
public double getGPA()
{ return gpa; }
}
public String toString()
{
String temp = name +
return temp;
+ age +
+ gpa + "\n";
Transcribed Image Text:1 AWNA 2 3 4 5 6 7 CHIENENGGANZE2222 8 9 10 11 12 13 14 15 16 17 18 19 20 21 23 24 25 26 27 // Student.java // Used by the Lab06 and Lab07 Assignments. public class Student { } private String name; private int age; private double gpa; public Student (String n, int a, double g) { } name = n; age = a; gpa g; = public String getName() { return name; } public int getAge() { return age; } public double getGPA() { return gpa; } } public String toString() { String temp = name + return temp; + age + + gpa + "\n";
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 4 steps with 4 images

Blurred answer
Knowledge Booster
Constants and Variables
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education