(Hardware Inventory) You’re the owner of a hardware store and need to keep an inventory that can tell you what tools you have, how many you have and the cost of each one. Write a program that initializes the file “hardware.dat” to 100 empty records, lets you input the data concerning each tool, enables you to list all your tools, lets you delete a record for a tool that you no longer have and lets you update any information in the file. The tool identification number should be the record number. Use the following information to start your file:
Trending nowThis is a popular solution!
Chapter 11 Solutions
MYPROGRAMMINGLAB WITH PEARSON ETEXT
Additional Engineering Textbook Solutions
C Programming Language
Starting Out with C++: Early Objects (9th Edition)
Artificial Intelligence: A Modern Approach
Concepts Of Programming Languages
Java How to Program, Early Objects (11th Edition) (Deitel: How to Program)
Starting Out with Python (4th Edition)
- Answer the given question with a proper explanation and step-by-step solution. 1- Write code that does the following: opens an output file with the filename number_list.txt, uses a loop to write the numbers 1 through 100 to the file, then closes the file.arrow_forwardC++: Matching Program Create a datafile that contains the first name, last name, gender, age, height, smoking preference, eye color and phone number. Add a variety of records to the file. A sample file looks like: Write a program that opens the file and reads the records one by one. The program will skip any records where the gender preference is not a match. Of those records that match the gender preference, check to see if the age and height are between the maximum and minum preferences. Then check to see if the smoking preference and eye color are also a match. If at least 3 of the remaining fields match, consider the record a partial match, and print it in the report. If all 4 of the remaining fields match, the record is a perfect match and print it in the report with an asterisk next to it. At the end of the program, close the file and report how many total records there were of the specified gender, how many were a partial match, and how many were a perfect match. See the…arrow_forward3. Write code that does the following: opens an output file with the filename number_1ist.txt, uses a loop to write the numbers 1 through 100 to the file, then closes the file. 4. Write code that does the following: opens the number_list.txt file that was created by the code you wrote in question 3, reads all of the numbers from the file and displays them, then closes the file. 5. Modify the code that you wrote in problem 4 so it adds all of the numbers read from the file and 414arrow_forward
- Python A Personal Fitness Tracker is a wearable device that tracks your physical activity, caloriesburned, heart rate, sleeping patterns, and so on. One common physical activity that most ofthese devices track is the number of steps you take each day. The file contains the number of steps a person has taken each day for a year.(Create a random step.txt file) Write a program that reads the file, then displays the average number of steps taken for each month.arrow_forwardC programming language Criteria graded: Declare file pointers Open file Read from file Write to file Close file Instructions: Write a segment of code that opens a file called “numbers.txt” for reading. This file is known to have 10 numbers in it. Read in each number and print a ‘*’ to the screen if the number is even. If the number is odd, do nothing. Conclude by closing this file.arrow_forward<<Write in Java>> - Challenge 7 File encryption is the science of writing the contents of a file in a secret code. Your encryption program should work like a filter, reading the contents of one file, modifying the data into a code, and then writing the coded contents out to a second file. The second file will be a version of the first file, but written in a secret code. Although there are complex encryption techniques, you should come up with a simple one of your own. For example, you could read the first file one character at a time, and add 10 to the character code of each character before it is written to the second file. - Challenge 8 Write a program that decrypts the file produced by the program in Programming Challenge 7. The decryption program should read the contents of the coded file, restore the data to its original state, and write it to another filearrow_forward
- In C++arrow_forwardPython programming help I need help of question 1 to read a file from persons.txt Write a program that takes a person’s details (name, age and a city), and writes to a file (persons.txt) using a loop repeatedly. You should write three person’s to the file. The program terminates on entering any key by the user, except on (Y or y) key. Sample output of the first run of the program is shown below: Enter name: JohnEnter age: 20Enter city: SydneyData saved: John 20 SydneyPress (Y or y) to add another person, or any key to exit Question 1) Write a program that read a file (persons.txt) from previous question given on the top of this question, and shows all the records/lines from the file as a nicely formatted report with a header as shown: Name Age City +---------------------+--------------------+--------------arrow_forwardPYTHON CODINGarrow_forward
- -all-occurrences-of-a-substring-in-a-string/.arrow_forwardprogramming language : c++ NOTE : YOU HAVE TO USE FILE HANDLING question : make a programm in c++ that ask user for the number of students whose records must be inserted in file. Afterwards, take records from user, calculate grade of students and store all records in a file.arrow_forwardWrite code that does the following: Opens a file named NumberList.txt, uses a loop to write the numbers 1 through 100 to the file, and then closes the file. Opens the NumberList.txt file and reads all of the numbers from the file and displays them, and then closes the file. Opens the NumberList.txt file and reads all of the numbers from the file, calculate the sum of these numbers and displays their total. Opens a file named NumberList.txt for writing, but does not erase the contents of the file if it already exists.arrow_forward
- C++ Programming: From Problem Analysis to Program...Computer ScienceISBN:9781337102087Author:D. S. MalikPublisher:Cengage Learning