
Database System Concepts
7th Edition
ISBN: 9780078022159
Author: Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher: McGraw-Hill Education
expand_more
expand_more
format_list_bulleted
Concept explainers
Question
C++ Using struct
Trying to get a better understanding on how to layout each part.
Write the program that has the following menu. This menu should continue to come up until the user selects Quit.
1) Add new user info.
2) Print complete report.
3) Print conditional report.
2) Print complete report.
3) Print conditional report.
4) Sort the data by Name. // Use bubble sort
5) Sort the data by Salary. // Use selection sort
6) Search for Name.
7) Quit
6) Search for Name.
7) Quit
(Option 1)
If the user Selects option 1) Add new user info the following questions should be asked. After this information has been input the program should go back to the menu. This information should be stored in an array of records.
Input Name -> Larry Atwood
Input Phone Number -> 701-555-1234
Input Salary-> 25000.00
Input Phone Number -> 701-555-1234
Input Salary-> 25000.00
(Option 2)
If the user Selects option 2) Print complete report the following output should appear. This is an example report assuming three users were input.
Name Phone Number Salary
Larry Atwood 701-555-1234 25000.00
Terry Frank 701-555-5555 65000.95
Chris Olien 605-555-4444 55500.00
Terry Frank 701-555-5555 65000.95
Chris Olien 605-555-4444 55500.00
(Option 3)
If the user Selects option 3) Print conditional report the following question should be asked, followed by the report. This report assumes the same three user from above.
Print user with a salary greater than -> 50000
Name Phone Number Salary
Terry Frank 701-555-5555 65000.95
Chris Olien 605-555-4444 55500.00
Chris Olien 605-555-4444 55500.00
(Option 4)
Should sort the data by name. For this option use the bubble sort. After sorting, if the user selects print a complete report, it should print the data in-order by name.
(Option 5)
(Option 5)
Should sort the data by salary. For this option use the selection sort. After sorting, if the users selects print a complete report, it should print the data in-order by salary.
(Option 6)
Should allow the user to input name to search for. If the name is found it should print all data for that person. If the name is not found the program should report that the name is not found.
Your program should at least have procedures for each item in the menu. Make sure you protect the data that should not change in the procedure.
Expert Solution

This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution
Trending nowThis is a popular solution!
Step by stepSolved in 5 steps

Knowledge Booster
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
- calcAverage function: This is function that returns no value and accept no parameters. This function will do the following: Ask the user to enter how many integers to enter. This has to be a positive integer and you need to validate that Write a “for” loop to accept this many integers and write the needed logic to calculate the average of these numbers and print that out Then the function will return back to the main functionarrow_forwardA for construct is a loop that processes a list of items. As a consequence, it continues to run as long as there are items to process. Is this statement true or false?arrow_forwardEven though the EXIT clause can be used in any type of loop, it is considered good form to use the EXIT clause only in basic loops. Answers: Yes Noarrow_forward
- Python elif ifarrow_forwardQ6: Complete the function that takes in a number x, and returns the value 1 if x > 0, otherwise it is 0 - this is called a step function ]: def step_function(x): "given x compute the correct value to return. Note you need to include the return statement here""" II II II # your code herearrow_forwardText-based adventure game: Pretend you are creating a text-based adventure game. At different points in the game, you want the user to select to fight, run, or hide from certain enemies. Modify the application below (week3.py) so that the selection variable is sent as an argument into the choice() function. The user should enter 1 to fight, 2 to run, or 3 to hide in the main(). The choice() function should print one of the three options. You will need to add an if statement in the choice() function to make the correct selection.arrow_forward
- PYTHON!!! The credit plan at TidBit Computer Store specifies a 10% down payment and an annual interest rate of 12%. Monthly payments are 5% of the listed purchase price, minus the down payment. Write a program that takes the purchase price as input. The program should display a table, with appropriate headers, of a payment schedule for the lifetime of the loan. Each row of the table should contain the following items: The month number (beginning with 1) The current total balance owed The interest owed for that month The amount of principal owed for that month The payment for that month The balance remaining after payment The amount of interest for a month is equal to balance × rate / 12. The amount of principal for a month is equal to the monthly payment minus the interest owed. An example of the program input and output is shown below: Enter the puchase price: 200 (SEE IMAGE FOR PURCHASE PRICE CHART) Results you should get: Input: 200 Output: Purchase price: 200…arrow_forwardComputer Science Part C: Interactive Driver Program Write an interactive driver program that creates a Course object (you can decide the name and roster/waitlist sizes). Then, use a loop to interactively allow the user to add students, drop students, or view the course. Display the result (success/failure) of each add/drop.arrow_forwardWhich is correct option for below question. Options are 0,7,none of these. With proper explanationarrow_forward
- This is to be done using Visual Studio and the information input needs to be stored in an array of records.arrow_forwardA for construct is an iterative loop that processes a list of items. As a consequence, it continues to process items as long as there are things to process. Is this a true or false statement?arrow_forwardhelparrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education

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)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON

Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON

C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON

Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning

Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education