Develop a Java program to create and operate on a list of students' records. The program...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Develop a Java program to create and operate on a list of students' records. The program enables the users to do the following. Student's record contains attributes including Name, ID, Address, Age, Major, Minor, Classification (ex: Freshman, sophomore, Junior, Senior, Graduate), GPA, and any other attribute(s) that you like to include. Create a Menu with the following options: 0. To Quit/Exit. 1. To Add a new student into the list. 2. To View students' list. 3. To Delete a student from the list. 4. To Update a student's record in the list. 5. To Search for a student's record. 6. To Copy a list. Develop a Java program to create and operate on a list of students' records. The program enables the users to do the following. Student's record contains attributes including Name, ID, Address, Age, Major, Minor, Classification (ex: Freshman, sophomore, Junior, Senior, Graduate), GPA, and any other attribute(s) that you like to include. Create a Menu with the following options: 0. To Quit/Exit. 1. To Add a new student into the list. 2. To View students' list. 3. To Delete a student from the list. 4. To Update a student's record in the list. 5. To Search for a student's record. 6. To Copy a list.
Expert Answer:
Answer rating: 100% (QA)
Mainjava import javautil public class Main private static Scanner in new ScannerSystemin private static ArrayList list new ArrayList private static void printMenu SystemoutprintlnMenu Systemoutprintln0 To QuitExit Systemoutprintln1 To add a new student into the list Systemoutprintln2 To View students list Systemoutprintln3 To Delete a student from the list Systemoutprintln4 To Update a students record in the list Systemoutprintln5 To Search for a students record un the list SystemoutprintlnEnter command private static void printUpdateMenu SystemoutprintlnUpdate Menu Systemoutprintln0 To QuitExit Systemoutprintln1 To update ID Systemoutprintln2 To update minor Systemoutprintln3 To update major Systemoutprintln4 To update classificcation Systemoutprintln5 To update age Systemoutprintln6 To update GPA SystemoutprintlnEnter command public static void mainString args whiletrue printMenu int x innextInt switchx case 0 return case 1 addStudent break case 2 viewList break case 3 deleteStudent break case 4 updateStudent break case 5 searchStudent break default SystemoutprintlnEX Invalid Cpmmand break private static Student findStudentIDString ID forStudent st list ifIDequalsstgetID return st return null private static Student findStudentNameString Name forStudent st list ifNameequalsstgetName return st return null private static void searchStudent SystemoutprintlnEnter students name String name innext Student st findStudentNamename ifst null SystemoutprintlnEX Student is not in the list else SystemoutprintlnsttoString private static void updateStudent SystemoutprintlnEnter students name String name innext Student st findStudentNamename ifst null SystemoutprintlnEX Student is not in the list else printUpdateMenu int x innextInt switchx case 0 return case 1 SystemoutprintlnEnter new ID stsetIDinnext break case 2 SystemoutprintlnEnter new Minor stsetMinorinnext break case 3 SystemoutprintlnEnter new Major stsetMajorinnext break case 4 SystemoutprintlnEnter new Classificcation stsetClassificcationinnext break case 5 SystemoutprintlnEnter new age stsetAgeinnextInt break case 6 SystemoutprintlnEnter new GPA stsetGPAinnextDouble break default SystemoutprintlnEX Invalid Cpmmand break private static void deleteStudent SystemoutprintlnEnter students name String name innext Student st findStudentNamename ifst null SystemoutprintlnEX Student is not in the list else listremovest SystemoutprintlnStudent with the name name deleted from the list private static void viewList Systemoutprintln ... View the full answer
Related Book For
Posted Date:
Students also viewed these programming questions
-
In this assignment, you will create a Java program to create an array of students to search. The program must implement a student class as specified in the following UML diagram. Student -name:...
-
Planning is one of the most important management functions in any business. A front office managers first step in planning should involve determine the departments goals. Planning also includes...
-
Googles ease of use and superior search results have propelled the search engine to its num- ber one status, ousting the early dominance of competitors such as WebCrawler and Infos- eek. Even later...
-
Let B > 0. Show that the maximum of (x 1 , . . . , x n ) = x 1 + + x n subject to x 2 1 + + x 2 n = B 2 is nB. Conclude that for all numbers a,..., an lal++lanl n(a + + a) / 1/2
-
If a company has sales of $10 million, a gross profit percentage of 35%, and days in inventory of 110, could you estimate its average inventory? Show your calculations.
-
On January 1, 2014, Palmer Company acquired a 90% interest in Stevens Company at a cost of $1,000,000. At the purchase date, Stevens Company's stockholders' equity consisted of the following: Common...
-
To use an F-test, both populations must have a _______________ distribution. In Exercises 5 and 6, fill in each blank with the appropriate word or phrase.
-
The following information is available for Gonzalez Manufacturing Company for the month ending March 31, 2010: Cost of goods manufactured .........$240,000 Selling expenses .............. 76,500...
-
Nowadays, more than ever before, an implementation of Project Portfolio Management function is becoming a business necessity. But what exactly is Project Portfolio Management and why only the right...
-
An automated car wash called Jet Express outside a large Texas city on the beltway is deciding whether to build and install one dedicated vehicle wash line or have two parallel wash lines. There are...
-
Given the following fault tree, find all minimal cut sets B AND C TOP EVENT D OR B G AND G AND C
-
Refer to Allucent website, https://allucent.io, and work on Research effective marketing materials Develop key marketing messages Identify effective marketing materials to develop
-
A typical lightbulb in your house is rated 50 W, which means that the bulb dissipates 50 W when connected to a DC voltage of 115 V. (a) What is the current through the lightbulb? (b) If the voltage...
-
A hockey puck is coming towards a hockey player at a velocity of 13 m/s [E]. The player hits the puck with her hockey stick, and the puck leaves her stick with a velocity of 17 m/s [W]. The puck was...
-
A steam supply line provides steam at 600 F and 300 psia. (1) Determine the mass and the temperature of the steam in an insulated piston-cylinder arrangement if sufficient steam is admitted to...
-
When making forecasts and analysing the results of a firm, increasing one variable usually means decreasing another. List three of the several possible common trade-offs that should be considered in...
-
A space vehicle of mass 8,000 kg (including crew) when empty of fuel takes on 42,000 kg of fuel at a space station. It is released from the station with an initial speed of 2 m/s, and its rockets...
-
10m solution. If Ka(HA) = 10 then pOH of solution will be [Given : log4=0.6] (A) 6.7 (B) Greater than 6.7 & less than 7.0 (C) Greater 7.0 & less than 7.3 (D) Greater than 7.3
-
Prove that if c 0 is any nonzero scalar and A is an invertible matrix, then the scalar product matrix c A is invertible, and (CA)-= -A-1
-
Let A be an m n matrix. Suppose that C = (A B ) is an m (n + k) matrix whose first n columns are the same as A. Prove that mgC mg A. Thus, appending more columns cannot decrease the size of a...
-
Deflation: Suppose A has eigenvalue λ and corresponding eigenvector v. (a) Let b be any vector. Prove that the matrix B = A - vbT also has v as an eigenvector, now with eigenvalue...
-
Why is the mass matrix \([\mathrm{m}]\) always positive definite?
-
Express the potential and kinetic energies of an \(n\)-degree-of-freedom system, using matrix notation.
-
What is the difference between generalized coordinates and Cartesian coordinates?
Study smarter with the SolutionInn App