Create a class Student with following instance private variables and member functions: Variable: id (int), name (String), Major (String) Constructor: overloaded constructor Methods: Accessor/Mutator (Setter/Getters), toString Create class College with following instance variable and member function: Variable: SIZE (final and int), Student array example: Student[] student; Constructor: overloaded which take one input size and this will be the value of SIZE viable and Student array size. Methods: addStudent(id, name, major) method: This method will create and add student object to the student array and when the array gets full the method will give an error message saying that you cannot add more students searchStudent(id) method: This method uses sequential search algorithm to find a student using student id in the student array. If the student is found it will return the student object otherwise it will return null. Create class StudentSearch with the main method and the main method does the following: Create College object by inputting size value. Ask the user to input 5 student's details. Add these students to the student array by calling addStudent() method Ask the user to input student id to search and display its details if found otherwise display "student not found".

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question
Create a class Student with following instance private variables and member functions:
Variable: id (int), name (String), Major (String)
Constructor: overloaded constructor
Methods: Accessor/Mutator (Setter/Getters), toString
Create class College with following instance variable and member function:
Variable: SIZE (final and int), Student array example: Student[] student;
Constructor: overloaded which take one input size and this will be the value of SIZE
viable and Student array size.
Methods: addStudent(id, name, major) method: This method will create and add student
object to the student array and when the array gets full the method will give an
error message saying that you cannot add more students
searchStudent(id) method: This method uses sequential search algorithm to
find a student using student id in the student array. If the student is found it will
return the student object otherwise it will return null.
Create class StudentSearch with the main method and the main method does the following:
Create College object by inputting size value.
Ask the user to input 5 student's details. Add these students to the student array by
calling addStudent() method
Ask the user to input student id to search and display its details if found otherwise display
"student not found".
Transcribed Image Text:Create a class Student with following instance private variables and member functions: Variable: id (int), name (String), Major (String) Constructor: overloaded constructor Methods: Accessor/Mutator (Setter/Getters), toString Create class College with following instance variable and member function: Variable: SIZE (final and int), Student array example: Student[] student; Constructor: overloaded which take one input size and this will be the value of SIZE viable and Student array size. Methods: addStudent(id, name, major) method: This method will create and add student object to the student array and when the array gets full the method will give an error message saying that you cannot add more students searchStudent(id) method: This method uses sequential search algorithm to find a student using student id in the student array. If the student is found it will return the student object otherwise it will return null. Create class StudentSearch with the main method and the main method does the following: Create College object by inputting size value. Ask the user to input 5 student's details. Add these students to the student array by calling addStudent() method Ask the user to input student id to search and display its details if found otherwise display "student not found".
Expert Solution
steps

Step by step

Solved in 3 steps with 2 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY