Sales Receipt File
Modify the program you wrote in
SALES RECEIPT
Unit Price: $10.00
Quantity: 5
Subtotal: $50.00
Sales Tax: $ 3.00
Total: $53.00
Want to see the full answer?
Check out a sample textbook solutionChapter 8 Solutions
Starting Out with Java: From Control Structures through Objects (7th Edition) (What's New in Computer Science)
Additional Engineering Textbook Solutions
Java: An Introduction to Problem Solving and Programming (7th Edition)
Software Engineering (10th Edition)
C++ How to Program (10th Edition)
Problem Solving with C++ (10th Edition)
Starting Out with C++: Early Objects (9th Edition)
Introduction to Java Programming and Data Structures, Comprehensive Version (11th Edition)
- C++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_forwardC++Inventory Program Write a program that uses a structure to store the following inventory data in a file: Item Description Quantity on Hand Wholesale Cost Retail Cost Date Added to Inventory The program should have a menu that allows the user to perform the following tasks: • Add new records to the file. • Display any record in the file. • Change any record in the file. Input Validation: The program should not accept quantities, or wholesale or retail costs, less than 0.The program should not accept dates that the programmer determines are unreasonable.arrow_forwardPythonarrow_forward
- Debug thisarrow_forwardPython Programming Questionarrow_forwardComputer Science C# Programming Object Orientation Please use Arrays or ArrayLists where appropriate Implement a menu driven program that has some operations for a food truck. A food truck has multiple food items as well as a menu which contains a selection of the food items which will be sold for that day. A maximum of 10 food items can appear on the menu for any day. For each food item keep a code, description, category, price and quantity in stock (code, description and category are not usually changed). Create a comma delimited text file called "items.txt" for 15 or more food items, indicating the item's description, category, price and quantity in stock. Read all the food items from the text file “Items.txt” Display all the food items available for this food truck. Continuously prompt the user for a food item’s code to be placed on the menu until the menu is full or the user enters -1. Note that only food items which have a positive quantity in stock may be added to…arrow_forward
- CMPSC 125: C++ Programming Programming Project Assignment Program Description: This assignment focuses on while loops and random numbers. Turn in a file named Lab4_yourFirstName.cpp. Your program allows the user to play a game in which the program thinks of a random integer and accepts guesses from the user until the user guesses the number correctly. After each incorrect guess, you will tell the user whether the correct answer is higher or lower. The below shows one sample execution of your program. Your output will differ depending on the random numbers chosen and user input typed, but the overall output structure should match that shown below: I am thinking of a number between 1 and 100 Your guess? 50 [Enter] It's lower Your guess? 25 [Enter] It's higher Your guess? 35 [Enter] It's lower Your guess? 30 [Enter] It's higher Your guess? 32 (Enter] It's lower Your guess? 31 [Enter] You got it right in 6 guesses! Do you want to play again? Y[Enter] I am thinking of a number between 1 and…arrow_forwardC programming Design a program that will record and display the distance between the rocket and the asteroids. Problem description The rocket is traveling through space. Each asteroid has (x, y, z) position in space, where x, y, and z are the distances in kilometers from the rocket which is at 0,0,0. It will read a file asteroids.txt that represents the ID and location of each asteroid. The distance between the rocket and each asteroid is calculated based on the asteroid’s X, Y, Z position using the following formula. √(x2+y2+z2) This program must be secure. The user puts their name and password, if both match the list you have in a text file on the disk (ID.txt), then the user gets access to the program. The program should allow 3 tries for name and password entry, if unsuccessful after 3 tries the program should print a message and terminate. Program Input -The name and password of the user. - A file called ID.txt which contains names and passwords. Example below: John 11234…arrow_forwardJAVA PPROGRAM ASAP Please Modify this program ASAP BECAUSE IT IS HOMEWORK ASSIGNMENT so it passes all the test cases. The program must pass the test case when uploaded to Hypergrade. Also, for test cases 1-4 it wants only to input Please enter the file name or type QUIT to exit: then input the file and display the Total number of words. For test cases 5 and 7 it wants to only to input Please enter the file name or type QUIT to exit then input input5.txt and then display File: input5.txt does not exist.\n then display Please enter the file name again or type QUIT to exit:\n then type input1.txt to display the total number of words or type quit to exit the program. For test case 6 it wants only to Please enter the file name again or type QUIT to exit:\n then type quit to exit the porgram. Chapter 9. PC #10. Word Counter (page 610) Write a program that asks the user for the name of a file. The program should display the number of words that the file contains. Input…arrow_forward
- Filename: Lab_exer19Write a program that will read an integer value and will display the multiplication table of the number entered. The value of the last multiplier should be 10.Example output:Enter a number : 5Multiplication table:5 * 1 = 55 * 2 = 105 * 3 = 155 * 4 = 20….5 * 10 = 5arrow_forwardData File: Example #1AAAAABBBBBCCCCCDDDDDAAEBCBAFBBCDCECDADDEFEEFFFExample #2AAATAABTBBBBCCCCTCDDTDDDAASAABBSBBCCSCCDSDDDEEEAEEFBFFFDDF Write a program that will give the user a brief introduction, then allow the user to type in the name of the file to be analyzed, the name of the data file to generate, and then process the data to match the output that is shown below. This DNA test measures the various parts of the sequence and assigns them a letter. While the letters could be anything from A to Z, the only letters that matter for this test are the letters {A,B,C,D} all other letters can be ignored completely. A sample will be tested, given a length of time and then tested again. Each time the scientist will generate a line of data. Here is one Example: Example #1 AAAAABBBBBCCCCCDDDDD AAEBCBAFBBCDCECDADDEFEEFFF At first glance the sample looks significantly different after the second test. But if you look at the data, you will note that since we only care about A,B,C,D’s that the…arrow_forward1994 Weekly Gas GraphIn the student sample programs for this book, you will find a text file named 1994_Weekly_Gas_Averages.txt. The file contains the average gas price for each week in the year 1994.(There are 52 lines in the file.) Using matplotlib, write a Python program that reads thecontents of the file then plots the data as either a line graph or a bar chart. Be sure to displaymeaningful labels along the X and Y axes, as well as the tick marks. (in python)arrow_forward
- EBK JAVA PROGRAMMINGComputer ScienceISBN:9781337671385Author:FARRELLPublisher:CENGAGE LEARNING - CONSIGNMENT