A file named Description.txt contains unknown number of metal sheets dimensions and description (maximum no. of records is 30). Each line in the file consists of Metal sheet name (string), width (float), length (float) and height (float). Write a program that reads the data from the file into 4 parallel arrays. Your program should calculate and display the following (see screen output): The number of Metal sheets in the file. The average length for all metal sheets. Metal sheets information (Metal sheet name and volume) for all items in the file. The volume is equal to width x length x height. The metal sheet name with smallest volume.
Q: Write a program to create two files with the names file4.txt and file4a.txt two 10 element int…
A: Given:- Write a program to createtwo files with the names file4.txt and file4a.txt two 10 element…
Q: Assume that a file contains students' ids, full names, and their scores (Assignments grade, quizzes…
A: Using the adequate header files. Declare the necessary integer type and character type arrays.…
Q: The local driver’s license office has asked you to create an application that grades the written…
A: Procedure Followed: Include header file. Start main method. Declare variables: exam_answers: array…
Q: Assume that a file contains students' ids, full names, and their scores (Assignments grade, quizzes…
A: Using necessary header files. Declare integer type and character type arrays. Prompt the user for…
Q: Write a program that displays the contents of a file in four columns titled “Item Name”, “Num of…
A: A C++ program is as follows, #include <iostream> #include <fstream> #include…
Q: 3. Write a program that reads (up to 100) temperature values from a file called input.txt. Read the…
A: Algorithm : MaxMin function : Step 1 : declare and initialize the variables. Step 2 : open the…
Q: in vaccine.txt it search how many vaccine are available. in dist.txt we have to import vaccines…
A: Our task is to crate the working code in which we have covered all the requirement and prerequisites…
Q: Assume that a file contains students' ids, full names, and their scores (Assignments grade, quizzes…
A: An array is a linear data structure where the elements occupy contiguous locations in memory. All…
Q: Problem: Write a program that prompts the user to enter 10 names, each with maximum of 30…
A: GIVEN CODE: //Start of program #include <iostream>//Line 1// #include <cstring>//Line…
Q: The file, Program11.txt, on the I: drive contains a chronological list of the World Series’ winning…
A: def read_file(): # Open file to read in read mode program11file = open('Program11.txt', 'r')…
Q: The manager of a football stadium wants you to write a program that calculates the total ticket…
A: #include <iostream>#include <fstream>#include <iomanip> using namespace std; int…
Q: Write a program that uses 3 command line arguments to search a list of float numbers in a file and…
A: Step 1 : Start Step 2 : Create a method SearchFile which takes the file name and the float value to…
Q: studentNumber (int), courseCode (char array [8]), finalGrade (float). 200201078 CENG104 89.75…
A: Declare an integer variable to store user input for options from 0 to 6. Declare variables to hold…
Q: 6. Write a program that reads (up to 100) temperature values from a file called input.txt. Read the…
A: Required:
Q: For this programming exercise you will use the text file named “USPopulation.txt” that is located on…
A: Program:- #include<iostream>#include<fstream>using namespace std; int main() { int…
Q: Assume that a file contains students' ids, full names, and their scores (Assignments grade, quizzes…
A: Program Plan Using the adequate header files. Declare the necessary integer type and character…
Q: A file named history.txt contains unknown number of car records (maximum no. of records is 50). Each…
A: // iostream in C++ is the standard library which implement stream based input/output capabilities…
Q: Write a program that calculate GST (Goods and Services Tax) for some electronic products.…
A: Program to calculate the GST on electronic products. Store the name of the products in the array…
Q: In this assignment you will write a program to find the mean of a list of grades stored in a file.…
A: Required: In this assignment you will write a program to find the mean of a list of grades stored in…
Q: Assume that a file contains students’ ids, full names, and their scores (Assignments grade, quizzes…
A: Using necessary header files. Declare integer type and character type arrays. Prompt the user for…
Q: Fix the following m file: Submit fixed m file and histogram jpg created…
A: % Compute the average of some temperature data % Then plot the data in a MATLAB plot window %…
Q: Submission: Combine the code files for Q1 and Q2 as a zip file and submit in Moodle Question 1:…
A: Below I have provided a java Program for the given question. Also, I have attached a screenshot of…
Q: A file named Description.txt contains unknown number of metal sheets dimensions and description…
A: The given is the problem where the details of the metals to be read out from the given file named…
Q: In this lab, you will read two files. Firstly, the ‘AccountData.csv’ file has the name and account…
A: Given In this lab, you will read two files. Firstly, the ‘AccountData.csv’ file has the name and…
Q: Required: The program must read from the above file and must load the name, surname and mark into…
A: Objective: This program reads a text file of four students and loads the details into three arrays.…
Q: Problem: Write a Python program that reads from an input file named employees.txt some employee…
A: Using python 2.7 def printHeader():print…
Q: and output txt file name. The input text file will have exactly 10 lines. Each line will have: 1-…
A: Actually, array is a collection of elements.
Q: In this assignment you will write a program to find the mean of a list of grades stored in a file.…
A: We have to create a program which reads the data of the text file named "john_smith_grades.txt" and…
Q: file contains a list of telephone number in following form. Aman 23456 Raj…
A: Note: We are authorized to answer one problem at a time since you have not mentioned which one you…
Q: Assume that a file contains students’ ids, full names, and their scores (Assignments grade, quizzes…
A: Given: Assume that a file contains students’ ids, full names, and their scores (Assignments grade,…
Q: Rewrite the code in Figure 8-93 to read each line of a text file into an array named strFordModel.…
A: Do While objectReader.Peek <> -1 'As long as there is data in the reader object.'strFordModel…
Q: A file contains a list of telephone number in following form. Aman 23456 Raj…
A: #include <bits/stdc++.h>using namespace std;int main(){ fstream my_file;…
Q: Assume that a file contains students' ids, full names, and their scores (Assignments grade, quizzes…
A: Using necessary header files. Declare integer type and character type arrays. Prompt the user for…
Q: Use the Active Code window below to create 4 parallel arrays and intialize them using initialization…
A: Answer is given below .
Q: #include #include struct info{ char names[100]; int age; float wage; }; int main(int argc, char*…
A: C programming is a general-purpose, procedural, imperative computer programming language developed…
Q: A vehicle inspection station keeps records of its checking services in a text "inspection.txt").…
A: Below is the implementation:-
Q: A file named Description.txt contains unknown number of metal sheets dimensions and description…
A: Program code: #include<bits/stdc++.h> #include <fstream>#include <sstream>#include…
Q: In the student sample program files for this chapter, you will find a text file named…
A: Code : HousePrice.cs File: namespace HousePriceAnalysis { class HousePrice { //…
Q: Write a function that reads all the numbers from a file into an array. The file is already open…
A: The function readData takes into parameters: an ifstream file already opened, an array of double to…
Q: (a) Write a C function readNums() that takes a filename and an integer array, reads the integer…
A: // Declaring header files#include <stdio.h>#define MAX 1000 // Function to read numbersint…
Q: Write a program in C++ to do the following: 2. Create an array to hold up to 20 integers. 3.…
A: A required program is as follows, #include <iostream> #include <string> #include…
Q: Assume that a file contains students’ ids, full names, and their scores (Assignments grade, quizzes…
A: Program Approach:- Using the header files. Using the struct keyword. Main function Storing…
Q: Write a program that asks for user's name, phone number and address. The program then saves all…
A: Step 1 : include fstream and string file and iostream file Step 2 : create 3 variables of string…
Q: Write a program that calculate GST (Goods and Services Tax) for some electronic products.…
A: code: #include<iostream> using namespace std; int main() { //variable declaration int choice;…
Q: n Dist.txt it will add vaccine in storage like how many vaccines are needed and from where is coming…
A: Given: Program have in c . we have to added a find function in this . it will take vaccine code to…
Q: Assume that a file contains students' ids, full names, and their scores (Assignments grade, quizzes…
A: Algorithm/Approach: Using necessary header files. Declare integer type and character type arrays.…
Q: write a function called fillArrayFromFile that will read numbers from a file that contains one…
A: Since the language is not mentioned, I have coded this in C language. Follow the code below
Q: Assume that a file contains students' ids, full names, and their scores (Assignments grade, quizzes…
A: Using necessary header files. Declare integer type and character type arrays. Prompt the user for…
Q: A file contains a list of telephone number in following form. Aman 23456 Raj…
A: Note: We’ll answer the first question since the exact one wasn’t specified. Please submit a new…
Step by step
Solved in 3 steps with 2 images
- Unknown number of movies are stored in a file named movies.txt. Each line consists of a movie type (A for Action, H for Horror and D for Drama), movie rating out of 10.0 and movie name. The maximum number of movies in the file is 100. Write a program that reads the data into three paraliel arrays. Then prompt the user to input the movie type and minimum rating. Then, the program should: (a) count and display the total number of movies in the file. (b) count and display the number of movies according to the selected type. (c) Display all the movie details of the selected type whose rating is equal or exceed the minimum rating. Sample 1/0 of the program is shown in the example below. movies.txt (input file) Screen Output A 7.5 The Fast & the Furious 7 Enter Movie Type: D 5.9 The Others Enter Minimum Rating: 7.8 D 9.1 Titanic 4.2 Message in a Bottle The total number of movies is 61 The number of movies of type D is 9 ....... The movies of type D with rating of 7.8 or above are: D. 7.8…All code in JAVASCRIPT Write a program that creates two files with the names file4 and file4a two 10 element int arrays with the names arrfile4 and arrfile4a; these arrays are to have different values write the contents of arrfile4 to file4write the contents of arrfile4a to file4aSubmission: Combine the code files for Q1 and Q2 as a zip file and submit in Moodle Question 1: Write a Program that to enter Student Name, Grade and print it to the screen with below requirements . . . . Asks the users how many student grades they want to enter. Based on that number the program should setup a loop to ask the user to enter student name and the student grade. Save this information using 2 arrays At the end the program must show the student names and grades with 1 student on each line on the screen Program should use Arrays and loops to achieve the task.
- Programming language: C/C++, Java, Python, or any other advanced programming languages Project Description: the file “IntegerArray.txt” included in this project folder contains all the 100,000 integers between 1 and 100,000 (inclusive) in some order, with no integer repeated. Your task is to compute the number of inversions in the file given, where the i-th row of the file indicates the i-th entry of an array. Because of the large size of this array, you should implement a divide-and-conquer algorithm.Write a program to create two files with the names file4.txt and file4a.txt two 10 element int arrays with the names arrfile4 and arrfile4a; these arrays are to have different values write the contents of arrfile4 to file4.txt write the contents of arrfile4a to file4a.txt Use a for loop to modify each element of arrfile4 by 2 Use a for loop to modify each element of arrfile4a by 3 write the new contents of arrfile4 to file4by2.txt write the new contents of arrfile4a to file4aby3.txtA file named Description.txt contains unknown number of metal sheets dimensions and description (maximum no. of records is 30). Each line in the file consists of Metal sheet name (string), width (float), length (float) and height (float). Write a program that reads the dimensions and add the volume only to an array. The volume is equal to width x length x height. Your program shoulà calculate and display the following (see screen output): The number of Metal sheets in the file. The average volume for all metal sheets. The smallest volume. Number of metal sheets with above average volumes.
- We’ve been updating and extending the inventory project to use files and to use arrays. Now it’s time to put it all together. I will give you a file inventory.txt File Contents: Red delicious apples 1.00 25 6 8 10 Assorted bouquets 4.00 50 10 10 0 Camembert cheese 2.00 25 10 12 4 END The file will have the following specifications: Each record consists of two lines. The first line contains the name of the product, which may be more than one word long. The second line contains the wholesale price as a decimal, the markup as a percentage, and three quantities, for counter, shelf, and warehouse. If the first line of a record contains the word END all by itself, that is the end of the file. Your task is to read each record into the program, as a string for the name, and numbers for the price and markup, and as an array of numbers for the quantities. Then calculate the total profit for each item: (wholesale price) * (markup, converted into a decimal) * (total quantity). Print out a report…C++: 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…Prompt the user to enter the name of an input file, then add the extension .txt: Enter input file name: Read data from file into a dynamically allocated array of n Sales structures. You may assume that the input file is valid. The only validation you are required to do is to check the number on the first line, and if it is 0 or negative, display display the following error message: The array size is invalid. The program ends here! and terminate the program. Show the following error message if the input file could not be opened: Error opening the input file: sales may.txt. Write a function to calculate the company's total sales according to the following specifications: function name: calculateTotal input parameters: the array of structures and its size • output parameters: none • returned value: the company's total sales (an integer). Show the array followed by the total sales to the screen (depending on the user's choice). Show Report (Y/N)?
- A file named history.txt contains unknown number of car records (maximum no. of records is 50). Each line in the file consists of car model (string), mileage (integer), and number of accidents (integer). Write a program that reads the data from the file into 3 parallel arrays. Your program should display the following: • Display the number of cars found. Display car information (car model and number of accidents) for all cars in file. • Display the average mileage of all cars Display the car model with the highest number of accidents.(Data processing) A bank’s customer records are to be stored in a file and read into a set of arrays so that a customer’s record can be accessed randomly by account number. Create the file by entering five customer records, with each record consisting of an integer account number (starting with account number 1000), a first name (maximum of 10 characters), a last name (maximum of 15 characters), and a double-precision number for the account balance. After the file is created, write a C++ program that requests a user-input account number and displays the corresponding name and account balance from the file.For this programming exercise you will use the text file named “USPopulation.txt” that is located on Blackboard in the same location as these instructions. The file contains the midyear population of the United States, in thousands, during the years 1950 through 2000. The first line in the file contains the population for 1950, the second line contains the population for 1951, and so forth. Write a program that reads the contents of the file into an array. The program should display the following information: • The average annual change in population during the time period. • The year with the greatest increase in population during the time period. • The year with the smallest increase in population during the time period.