Shopping Cart System
Create an application that works like a shopping cart system for an online book store. In the book’s source code (available at www.pearsonhighered.com/gaddis) you will find a file named BookPrices.txt. This file contains the names and prices of various books, formatted in the following fashion:
I Did It Your Way, 11.95
The History of Scotland, 14.50
Learn Calculus in One Day, 29.95
Feel the Stress, 18.50
Each line in the file contains the name of a book, followed by a comma, followed by the book’s retail price. When your application begins execution, it should read the contents of the file and store the book titles in a ListView. The user should be able to select a title from the list and add it to a “shopping cart,” which is simply another ListView control. The application should have buttons or menu items that allow the user to remove items from the shopping cart, clear the shopping cart of all selections, and check out. When the user checks out, the application should calculate and display the subtotal of all the books in the shopping cart, the sales tax (which is 7 percent of the subtotal), and the total.
Want to see the full answer?
Check out a sample textbook solutionChapter 12 Solutions
Starting Out with Java: Early Objects (6th Edition)
Additional Engineering Textbook Solutions
Digital Fundamentals (11th Edition)
Artificial Intelligence: A Modern Approach
Java How To Program (Early Objects)
Concepts of Programming Languages (11th Edition)
Starting Out with C++: Early Objects (9th Edition)
Java: An Introduction to Problem Solving and Programming (8th Edition)
- Each of the following files in the Chapter.08 folder of your downloadable student files has syntax and/or logical errors. In each case, determine the problem, and fix the program. After you correct the errors, save each file using the same filename preceded with Fixed. For example, DebugEight1.cs will become FixedDebugEight1.cs. a. DebugEight1.cs b. DebugEight2.cs c. DebugEight3.cs d. DebugEight4.csarrow_forwardDriver’s License Exam The local driver’s license office has asked you to create an application that grades the written portion of the driver’s license exam. The exam has 20 multiple-choice questions. Here are the correct answers: 1. B 2. D 3. A 4. A 5. C 6. A 7. B 8. A 9. C 10. D 11. B 12. C 13. D 14. A 15. D 16. C 17. C 18. B 19. D 20. A Your program should store these correct answers in an array. The program should read the student’s answers for each of the 20 questions from a text file and store the answers in another array. (Create your own text file to test the application.) After the student’s answers have been read from the file, the program should display a message indicating whether the student passed or failed the exam. (A student must correctly answer 15 of the 20 questions to pass the exam.) It should then display the total number of correctly answered questions, the total number of incorrectly answered questions, and a list showing the question numbers of the incorrectly…arrow_forwardC++HurdleWords The HurdleWords class is mostly provided to you. HurdleWords is constructed from two files in the data/ folder: ● valid_guesses.txt (all 5 letter guesses considered to be valid words to guess), and ● valid_hurdles.txt (all words that may be selected to be the secret Hurdle.) ● Note: you may edit both text files if you’d like to add custom words to your game. HurdleWords stores all potential valid Hurdles from valid_hurdles.txt into a vector of strings (valid_hurdles_), and all valid guesses from valid_guesses.txt into an unordered set of strings (valid_guesses_). A set is simply a data structure that contains no duplicates and allows for a speedy lookup to check if a given element exists within the set. Because there are over 10,000 valid guesses, we store them in an unordered set to leverage their speediness, as you will need to check if a user-submitted guess is considered valid (i.e. their guess is considered a valid guess in the dictionary). You are responsible for…arrow_forward
- Create an application which is going to find out your maximum grade out of your Midterm grades. Your program should do the following activities: ● Create a list consist of your midterm grades. • Create a variable which keeps your school ID. ● Create a variable which keeps your name. . Create a variable which keeps your date of birth. Create a variable which calculates the average of the list. ● . The maximum grade of the list will be displayed in such a format: . You are going to use max() function in order to find the maximum grade. · You are going to find average of the list. The following output will be on the screen: My name is and my maximum midterm grade is The average of my midterm grades are_________. Do not forget to use comment tag in order to explain each line.arrow_forwardCreate a simple program for a quiz Software Requirements: Latest version of NetBeans IDE Java Development Kit (JDK) 8 Procedure: Create a folder named LastName_FirstName (ex. Dahan yoon) in your local Create a new project named LabExer5B. Set the project location to your own The program shall: contain an array of 10 multiple choice questions with three (3) choices each and require the user to choose among A, B, or C; Note: Cases are ignored. Lowercase letters are acceptable (a, b, c). Create a try-catch structure to handle three (3) exceptions. These are when the user inputs the following: an invalid letter (not A, B, or C) a number or any special character blank (no answer) Prompt the user that he can answer again if any of the three (3) exceptions is Display the score.arrow_forwardLatest version of NetBeans IDE Java Development Kit (JDK) 8 Create a folder named Dahan_yoon in your local Create a new project named LabExer5A. Set the project location to your own The program shall: generate a random number from 1 to 50 for a player to guess; display a message that indicates whether the player’s guess is correct, too low, or too high; and prompt the user to keep on guessing until the correct value is entered Create a try-catch structure that will handle two (2) exceptions. These are when the user inputs the following: a number that is out of range (1 – 50) a letter or any non-numeric character Prompt the user so that he can guess again if an exception is Display the number of total Note: An invalid input (when an exception is thrown) is not considered a valid guess or attempt.arrow_forward
- image viewer please answer the following question in javaarrow_forwardLanguage in C# using Visual Studio in Windows Form app please. For the name files, just create a text file that has a few names for your time sake.arrow_forwardGroup 2/12 Problem – Population Create an application that predicts the approximate size of a population of organisms. The application should use textboxes to allow the user to enter the starting number of organisms, the average daily population increase (as a percentage), and the number of days the organisms will be left to multiply. Use a ListBox to display the population size for each day of the simulation. If the user clicks the Save button, save the current prediction to a file. Group 3/7 Problem – Dice Simulatorarrow_forward
- Solve it as soon as possiblearrow_forwardWrite a Java GUI application that will keep track of student results at a local college and save the process result into a database. The application must contain the result that a student has obtain for a test, assignment and exam. Question 1 On the form create a list box that will allow the user to select the student ID populate populate from the text file. Also create a search button when clicked will display the average , highest and lowest result according to the student number and a Save button to save the result to an online data base. Student number should be used as a primary key for your database. Question 2 Create a sequential file (student.txt) that contains data for the following fields The student ID number The student test result The student assignment result The student exam result Question 3 Load the data from the student.txt file and populate the list box with the student numbers Question 4 Calculate the average result obtained by the student. Question 5…arrow_forwardWrite a Java GUI application that will keep track of student results at a local college and save the process result into a database. The application must contain the result that a student has obtain for a test, assignment and exam. Question 1 On the form create a list box that will allow the user to select the student ID populate populate from the text file. Also create a search button when clicked will display the average , highest and lowest result according to the student number and a Save button to save the result to an online data base. Student number should be used as a primary key for your database. Question 2 Create a sequential file (student.txt) that contains data for the following fields The student ID number The student test result The student assignment result The student exam result Question 3 Load the data from the student.txt file and populate the list box with the student numbers Question 4 Calculate the average result obtained by the student. Question 5…arrow_forward
- Programming with Microsoft Visual Basic 2017Computer ScienceISBN:9781337102124Author:Diane ZakPublisher:Cengage LearningEBK JAVA PROGRAMMINGComputer ScienceISBN:9781337671385Author:FARRELLPublisher:CENGAGE LEARNING - CONSIGNMENTEBK JAVA PROGRAMMINGComputer ScienceISBN:9781305480537Author:FARRELLPublisher:CENGAGE LEARNING - CONSIGNMENT
- Programming Logic & Design ComprehensiveComputer ScienceISBN:9781337669405Author:FARRELLPublisher:CengageMicrosoft Visual C#Computer ScienceISBN:9781337102100Author:Joyce, Farrell.Publisher:Cengage Learning,