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 dimensions and add the volume only to an array. The volume is equal to width x length x height. Your program should 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.
Q: Given the following code, and provided initialized variables, provide answers for parts (a), (b) and…
A: a) total=total+testScoreArray[index]; b) average=(double)total/testScoreArray.Length; c)…
Q: All code in JAVASCRIPT Write a program that creates two files with the names file4 and file4a two…
A: the program is given below:-
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: Write and run a program that reads integers from the file "numbers.txt" into array. Then, write the…
A: A C++ program is as follows, File name: “main.cpp” #include<iostream> #include<fstream>…
Q: For this assignment you will be working with arrays and File I/O. Open a new Java file called…
A: Step 1 : Start Step 2 : Take user input of the file name from the user. Step 3 : Open the file using…
Q: 2) Assume that you have patient list and name, surname, age and height of patients are given as…
A: Note: Since no programming language is mentioned. I am attempting this in C++. if you need it in any…
Q: Given two arrays named locks and keys of size 10 each, keys[i] is the key for lock[i]. Write a…
A: Since the coding language is not mentioned, I have done the code in C++. Algorithm : Step 1 :…
Q: Given the formula for converting Fahrenheit (F) to Celcius (C): C = 5/9 x (F - 32), where C is the…
A: The program is written in C++ #include <iostream> #include <fstream> #include…
Q: 1. Create an array of 8 disks with 4 disks of type Audio created at even indices and 4 disks of type…
A: It Iterates over an array holding the even and odd numbers of the two variables to store the…
Q: Write a complete program for a Class Record System. Create 6 one-dimensional arrays, namely : SN[50]…
A:
Q: Write a program that fills an array with user input and displays 1) size, 2) average, 3) maximum and…
A: import java.util.Scanner; public class Lab10 { public static void main(String[] args) {…
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: C++/CPP Exercise: 1- Define a class student with the following fields: a. First name b. Last name c.…
A: Note- As per the guidelines I am answering only one question. ProgramApproach: Define the…
Q: You are to read 10 numbers from a data file into an array named List. Create another 10 element…
A:
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: 4. Write a program that will: a. Define 10 by 12 array. Fill the array with random number in the…
A: Since no programming language is mentioned, I am using python Code: import numpy as npfrom numpy…
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: Write a program as part of the UCAM application that will store the Fall 2021 SPL final exam scores…
A: Actually, program is an executable software that runs on a computer.
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: In a file contains the line "very good boy\r\n" then on reading this line into the array str using…
A: I have answered the question in step 2.
Q: The file named gasData.txt contains experimental data on the volume (V) in m³ and temperature (T) in…
A: As per the given question, we need to write a function named ReadGasData() that reads data from…
Q: Create 10 accounts in an array with id 0, 1, ..., 9, and an initial balance of $100. The system…
A: Actually, given information; Create 10 accounts in an array with id 0, 1, ..., 9, and an initial…
Q: Write a program that will use a two-dimensional arrays named : Record[50||4). Number, the grades Q1,…
A: Below is the code for the above program. The user needs to enter the student number and his grades…
Q: Write a program that will use a two-dimensional arrays named : Record[50][4] . The 1st column of the…
A: Bubble sort is a method in which we compare adjacent items of an array. swapping is used to shift…
Q: In a program you need to store the names and populations of 12 countries. Create an appropriate…
A: Related objects within the arrays must have related indices, ideally the same, that are used to…
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: Write a program that prompts the user to specify the coefficients of a quadratic equation and then…
A: As programming language is not mentioned we are providing code in C++
Q: rite a program that prompts the user to specify the coefficients of a quadratic equation and then…
A: /* C++ program to find roots of a quadratic equation */#include <bits/stdc++.h>using namespace…
Q: Write a program to create an answer sheet to read the student’s answers for a ten (10) item exam. It…
A: import java.util.Scanner; public class Main { public static void main(String[] args) {…
Q: Write a program to use parallel arrays to save User ID and Password. Ask the user to enter the user…
A: Source code : IDPassword.java import java.util.Scanner; public class IDPassword {…
Q: Write a program where the user enters 10 floating point numbers into an array and it shows the…
A: Program Approach: Including a necessary header file Declaring the main method Declare an array of…
Q: Write a C++ program to prompt user for a file name and read the data containing information for a…
A: C++ programming is the programming languages are used to create the web applications and to create…
Q: There is an array of objects having size 10, and we have to retrieve a data value from 5th object.…
A: As we know that the index of an array starts from 0. If we want to find out the 5th element the…
Q: Write a program that records high-score data for a fictitious game. The program will ask the user to…
A: PROGRAM INTRODUCTION: Include the required header files. Declare the prototype for all the methods.…
Q: Write a Java program that defines a two-dimensional array named scores of size 4x3 of type integer.…
A: The objective of the given problem is to read data from the text file and store it into a 2D array…
Q: Write a sub that creates an array day of size 7 and then populates it with the days of the week…
A: The question is asking to solve in VBA code as we have to create sub. The complete VBA Code is…
Q: 6. Write a program that reads (up to 100) temperature values from a file called input.txt. Read the…
A: Write a program that reads (up to 100) temperature values from a file called input.txt. Read the…
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: 3. Write a program that reads (up to 100) temperature values from a file called input.txt. Read the…
A: Note: Answering the question in python as no language is mentioned. Input : Read the data from…
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: Create an indexception value of unique consonants and unique vowels. This is the Input: String of…
A: Tо sоlve this рrоblem, First оf аll, we need tо соnvert every uррer-саse сhаrасter…
Q: Write a program to accomplish the following: One of your professors has asked you to write a program…
A: The code is given below in the C++ language :
Q: create an INDEXCEPTION value of the unique vowels and unique consonants that the name that was given…
A: # Python code to count and display number of vowels# Simply using for and comparing it with a#…
Q: program will then arrange the numbers in ascending order and 2 Wite a program will accept and store…
A: I give the code in Java as per your requirement along with output and code screenshot
Q: Extend the program belowso that after closing the files, program asks the user to enter a name. The…
A: Programming instructions: Declare the required variables. Take input from the user. Use a loop to…
Q: Using the two arrays shown below,write a program that prompts the user to enter an integer between 1…
A: PROGRAM STRUCTURE: Import the Scanner class to use the Scanner function to take the input from…
Q: You have been asked to code a solution for the following problem: 1. Read a file that contains the…
A: The question asks to read data from a text file - weights.txt and perform - display, sorting and…
Q: Write a Java code that creates two files with the names file4 and file4a. create two int arrays…
A: NOTE Below is the answer for the given question. Hope you understand it well. If you have any…
Step by step
Solved in 5 steps with 3 images
- Computer Science Write a program that uses 3 command line arguments to search a list of float numbers in a file and prints out the result of whether the number was found or not on the console. Also, it prints the array in the reverse order (not sorted but reverse order of how the numbers were read in). The first argument is the name of the input file which has the numbers to be searched, the second is an integer specifying how many numbers are in the input file and the third argument is the float number being searched for. Use dynamic memory allocation for the array and use a function (that returns a boolean value) to do the searching. Also make sure in the beginning of your program, that the program will execute only if exactly three arguments (other than executable name itself) are specified. at the command line.Given a text file containing the availability of food items, write a program that reads the information from the text file and outputs the available food items. The program first reads the name of the text file from the user. The program then reads the text file, stores the information into four separate arrays, and outputs the available food items in the following format: name (category) -- description Assume the text file contains the category, name, description, and availability of at least one food item, separated by a tab character. Ex: If the input of the program is: food.txt and the contents of food.txt are: Sandwiches Ham sandwich Classic ham sandwich Available Sandwiches Chicken salad sandwich Chicken salad sandwich Not available Sandwiches Cheeseburger Classic cheeseburger Not available Salads Caesar salad Chunks of romaine heart lettuce dressed with lemon juice Available Salads Asian salad Mixed greens with ginger dressing, sprinkled with sesame Not available Drinks Water…Given a text file containing the availability of food items, write a program that reads the information from the text file and outputs the available food items. The program first reads the name of the text file from the user. The program then reads the text file, stores the information into four separate arrays, and outputs the available food items in the following format: name (category) -- description Assume the text file contains the category, name, description, and availability of at least one food item, separated by a tab character. Ex: If the input of the program is: food.txt and the contents of food.txt are: Sandwiches Ham sandwich Classic ham sandwich Available Sandwiches Chicken salad sandwich Chicken salad sandwich Not available Sandwiches Cheeseburger Classic cheeseburger Not available Salads Caesar salad Chunks of romaine heart lettuce dressed with lemon juice Available Salads Asian salad Mixed greens with ginger dressing, sprinkled with sesame Not available Drinks Water…
- Given a text file containing the availability of food items, write a program that reads the information from the text file and outputs the available food items. The program first reads the name of the text file from the user. The program then reads the text file, stores the information into four separate arrays, and outputs the available food items in the following format: name (category) -- description Assume the text file contains the category, name, description, and availability of at least one food item, separated by a tab character. Ex: If the input of the program is: food.txt and the contents of food.txt are: Sandwiches Ham sandwich Classic ham sandwich Available Sandwiches Chicken salad sandwich Chicken salad sandwich Not available Sandwiches Cheeseburger Classic cheeseburger Not available Salads Caesar salad Chunks of romaine heart lettuce dressed with lemon juice Available Salads Asian salad Mixed greens with ginger dressing, sprinkled with sesame Not available Drinks Water…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 file4aJAVA PROGRAM Lab #2. Chapter 7. PC #11. Array Operations (Page 491) Write a program that accepts a file name from command line, then initializes an array with test data using that text file as an input. The file should contain floating point numbers (use double data type). The program should also have the following methods: * getTotal. This method should accept a one-dimensional array as its argument and return the total of the values in the array. * getAverage. This method should accept a one-dimensional array as its argument and return the average of the values in the array. * getHighest. This method should accept a one-dimensional array as its argument and return the highest value in the array. * getLowest. This method should accept a one-dimensional array as its argument and return the lowest value in the array. double_input1.txt double_input2.txt PLEASE MODIFY THIS CODE, SO WHEN I UPLOAD IT TO HYPERGRADE IT PASSES ALL THE TEST CASES, BECAUSE WHEN I UPLOAD…
- JAVA PROGRAM Lab #2. Chapter 7. PC #11. Array Operations (Page 491) Write a program that accepts a file name from command line, then initializes an array with test data using that text file as an input. The file should contain floating point numbers (use double data type). The program should also have the following methods: * getTotal. This method should accept a one-dimensional array as its argument and return the total of the values in the array. * getAverage. This method should accept a one-dimensional array as its argument and return the average of the values in the array. * getHighest. This method should accept a one-dimensional array as its argument and return the highest value in the array. * getLowest. This method should accept a one-dimensional array as its argument and return the lowest value in the array. This part of the program is not correct. There should be no Scanner. You should read the file name from the command line.Scanner scanner = new…JAVA PROGRAM Lab #2. Chapter 7. PC #11. Array Operations (Page 491) Write a program that accepts a file name from command line, then initializes an array with test data using that text file as an input. The file should contain floating point numbers (use double data type). The program should also have the following methods: * getTotal. This method should accept a one-dimensional array as its argument and return the total of the values in the array. * getAverage. This method should accept a one-dimensional array as its argument and return the average of the values in the array. * getHighest. This method should accept a one-dimensional array as its argument and return the highest value in the array. * getLowest. This method should accept a one-dimensional array as its argument and return the lowest value in the array. PLEASE MOFDIFY THIS PROGRAM SO THERE ARE ONLY THREE DIGITS AFTER THE DECIMAL POINT FOR LOWEST, HIGHTEST, AVERAGE AND TOTAL. BECAUSE WHEN I UPLOAD IT TO…JAVA PROGRAM Lab #2. Chapter 7. PC #11. Array Operations (Page 491) Write a program that accepts a file name from command line, then initializes an array with test data using that text file as an input. The file should contain floating point numbers (use double data type). The program should also have the following methods: * getTotal. This method should accept a one-dimensional array as its argument and return the total of the values in the array. * getAverage. This method should accept a one-dimensional array as its argument and return the average of the values in the array. * getHighest. This method should accept a one-dimensional array as its argument and return the highest value in the array. * getLowest. This method should accept a one-dimensional array as its argument and return the lowest value in the array. PLEASE FIX AND MODIFY THIS JAVA PROGRAM. THIS PROGRAM DOES NOT WORK IN HYPERGERADE. IT ONLY PASSSES 2 OUT OF 4 TEST CASES. I NEED IT TO PASS 4 OUT OF 4…
- JAVA PROGRAM Lab #2. Chapter 7. PC #11. Array Operations (Page 491) Write a program that accepts a file name from command line, then initializes an array with test data using that text file as an input. The file should contain floating point numbers (use double data type). The program should also have the following methods: * getTotal. This method should accept a one-dimensional array as its argument and return the total of the values in the array. * getAverage. This method should accept a one-dimensional array as its argument and return the average of the values in the array. * getHighest. This method should accept a one-dimensional array as its argument and return the highest value in the array. * getLowest. This method should accept a one-dimensional array as its argument and return the lowest value in the array. PLEASE MAKE A PROGRAM SO WHEN I UPLOAD IT TO HYPERGRADE IT PASSES ALL THE TEST CASES. BECAUSE WHEN I UPLOAD THE PROGRAM TO HYPERGRADE IT PASSES 2 OUT OF 4…Java Program Lab #2. Chapter 7. PC #11. Array Operations (Page 491) Write a program that accepts a file name from command line, then initializes an array with test data using that text file as an input. The file should contain floating point numbers (use double data type). The program should also have the following methods: * getTotal. This method should accept a one-dimensional array as its argument and return the total of the values in the array. * getAverage. This method should accept a one-dimensional array as its argument and return the average of the values in the array. * getHighest. This method should accept a one-dimensional array as its argument and return the highest value in the array. * getLowest. This method should accept a one-dimensional array as its argument and return the lowest value in the array. double_input1.txt double_input2.txt PLEASE MODIFY THIS CODE, SO WHEN I UPLOAD IT TO HYPERGRADE IT PASSES ALL THE TEST CASES, BECAUSE WHEN I UPLOAD…JAVA PROGRAM Lab #2. Chapter 7. PC #11. Array Operations (Page 491) Write a program that accepts a file name from command line, then initializes an array with test data using that text file as an input. The file should contain floating point numbers (use double data type). The program should also have the following methods: * getTotal. This method should accept a one-dimensional array as its argument and return the total of the values in the array. * getAverage. This method should accept a one-dimensional array as its argument and return the average of the values in the array. * getHighest. This method should accept a one-dimensional array as its argument and return the highest value in the array. * getLowest. This method should accept a one-dimensional array as its argument and return the lowest value in the array. This part of the program is not correct. There should be no Scanner. You should read the file name from the command line.Scanner scanner = new…