C++ for Engineers and Scientists
4th Edition
ISBN: 9781133187844
Author: Bronson, Gary J.
Publisher: Course Technology Ptr
expand_more
expand_more
format_list_bulleted
Concept explainers
Textbook Question
Chapter 8, Problem 6PP
(Data processing) Write a C++
Expert Solution & Answer
Want to see the full answer?
Check out a sample textbook solutionStudents have asked these similar questions
(C Program)
(C Language)
A photographer is organizing a photo collection about the national parks in the US and would like to annotate the information about each of the photos into a separate set of files. Write a program that reads the name of a text file containing a list of photo file names. The program then reads the photo file names from the text file, replaces the "_photo.jpg" portion of the file names with "_info.txt", and outputs the modified file names.
Assume the unchanged portion of the photo file names contains only letters and numbers, and the text file stores one photo file name per line. If the text file is empty, the program produces no output. Assume also the maximum number of characters of all file names is 100.
Instructions(C++)
Write a program that reads a file consisting of students’ test scores in the range 0–200. It should then determine the number of students having scores in each of the following ranges:0–24, 25–49, 50–74, 75–99, 100–124, 125–149, 150–174, and 175–200.Output the score ranges and the number of students. (Run your program with the following input data:
76, 89, 150, 135, 200, 76, 12, 100, 150, 28, 178, 189, 167, 200, 175, 150, 87, 99, 129, 149, 176, 200, 87, 35, 157, 189
Chapter 8 Solutions
C++ for Engineers and Scientists
Ch. 8.1 - Prob. 1ECh. 8.1 - (Practice) a. Write a set of two statements...Ch. 8.1 - Prob. 3ECh. 8.1 - Prob. 4ECh. 8.1 - Prob. 5ECh. 8.1 - Prob. 8ECh. 8.1 - Prob. 9ECh. 8.1 - Prob. 10ECh. 8.2 - Prob. 1ECh. 8.2 - (Practice and modify) a. Enter and run Program...
Ch. 8.2 - (Practice and modify) a. Write a C++ program that...Ch. 8.2 - (Practice) Determine the OS command or procedure...Ch. 8.2 - Prob. 5ECh. 8.2 - (Data processing) a. Write a C++ program that...Ch. 8.2 - Prob. 7ECh. 8.2 - Prob. 8ECh. 8.2 - Prob. 9ECh. 8.3 - Prob. 1ECh. 8.3 - Prob. 2ECh. 8.3 - Prob. 3ECh. 8.3 - Prob. 4ECh. 8.3 - Prob. 5ECh. 8.3 - Prob. 6ECh. 8.4 - Prob. 1ECh. 8.4 - Prob. 2ECh. 8.4 - Prob. 3ECh. 8.4 - Prob. 4ECh. 8.5 - (Practice) Write a C++ program to create the...Ch. 8.5 - Prob. 2ECh. 8.5 - Prob. 3ECh. 8.5 - Prob. 4ECh. 8.5 - Prob. 5ECh. 8 - Prob. 1PPCh. 8 - (Data processing) a. Store the following data in a...Ch. 8 - (Data processing) Write a C++ program that allows...Ch. 8 - (Data processing) Write a C++ program that permits...Ch. 8 - (Data processing) Write a C++ program that reads...Ch. 8 - (Data processing) Write a C++ program that reads...Ch. 8 - Prob. 7PPCh. 8 - (Data processing) A bank’s customer records are to...Ch. 8 - (Inventory) Create an ASCII file with the...
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Similar questions
- (C ONLY) The program expects the name of an input file and an output file to be given by the user. If the user does not input any names, default file names should be used, such as input.txt and output.txt. The input files have lines which look like this: 3 Tester College; 1909 33001 The first number represents the rank; it is followed by the school name, year founded, and approximate number of students. Read the list of colleges into an array of structures. You may assume that the maximum size of a college name string is 64. The program should use either the insertion sort algorithm or the selection sort algorithm to sort the array in descending order by rank. Display any k consecutive schools requested by the user. For instance, if the user enters 12, the program displays the first 2 schools in a readable format of your choice. If the user enters 15, the program displays the first five schools, if the user enters 2 7, display 7 schools beginning with the one at index 1 (2 - 1), and so…arrow_forwardC++. Solution with explanation please.arrow_forward(C Language) Given a set of text files containing synonyms for different words, complete the main program to output the synonyms for a specific word. Each text file contains synonyms for the word specified in the file’s name, and the synonyms within the file are grouped according to the synonyms' first letters, separated by an '*'. The program reads a word and a letter from the user and opens the text file associated with the input word. The program then stores the contents of the text file into a two-dimensional array of char* predefined in the program. Finally the program searches the array and outputs all the synonyms that begin with the input letter, one synonym per line, or a message if no synonyms that begin with the input letter are found.arrow_forward
- Instructions(C++) A company hired 10 temporary workers who are paid hourly and you are given a data file that contains the last name of the employees, the number of hours each employee worked in a week, and the hourly pay rate of each employee. You are asked to write a program that computes each employee’s weekly pay and the average salary of all employees. The program then outputs the weekly pay of each employee, the average weekly pay, and the names of all the employees whose pay is greater than or equal to the average pay. If the number of hours worked in a week is more than 40, then the pay rate for the hours over 40 is 1.5 times the regular hourly rate. Use two parallel arrays: a one-dimensional array to store the names of all the employees (Name) a two-dimensional array of 10 rows and 3 columns to store the number of hours an employee worked in a week (Hrs Worked), the hourly pay rate (Pay Rate), and the weekly pay (Salary). Your program must contain at least the following…arrow_forwardModified Programming ). (Count vowels and consonants, file input, nested-loops, switch statement) Assume that letters A, E, I, O and U are the vowels. Write a program that reads strings from a text file, one line at a time, using a while-loop. You do the following operations within each loop: • Read one line from the input file and store it in a string; Count the number of vowels and consonants (using either while-loop or for-loop) in the file string. The while-loop will terminate when the end-of-file is reached. After the loop is finished, the program displays the total number of vowels and consonants in the text file. [A text file, named “ass4_Q6_input.txt", is provided as your testing input file.]arrow_forward(Written in C) Create a payroll program to store and calculate the payroll for a small company as follows:Create an array of floats that is 4 rows and 50 columns, with the columns being the number of employeerecords stored in the array.Program parameters are as follows:Create a menu in a function menu and call it with the following options (use a do-while loop):A or a to add employee infoD or d to display employee infoT or t to display total payrollS or s to display the info of all employeesC or c to display the count of employees present in the arrayF or F to delete a recordZ or z to exit programThe information for each employee is: employee number, hours worked, pay rate per hour, taxdeduction.Option A or a:Call the function possible to check and if the index returned is 50 then output a msg saying that thearray is full. If the index returned is less than 50 the call the function add, pass to it the available index asthe third argument and the function will ask the user for one…arrow_forward
- (C Language)arrow_forward(C++ language)arrow_forward(Write a C++ program) This homework is from our textbook page 459 # 16. The Dodgers recently won the World Series vs the Tampa Bay Rays. Attached are two files: Teams.txt - This file contains a list of serveral Major League baseball teams in alphabetical order. Each team is listed in the file has won the World Series at least once. WorldSeries Winners.txt - This file contains a chronological list of the World Series' winning teams from 1903-2020. (The first line of the file is the name of the team that won in 1903, and the last line is the name of the team that won in 2020. Note the World Series was not played in 1904 or 1994.) Write a program that displays the contents of the Teams.txt file on the screen and prompts the user to enter the name of one of the teams. The program should then display the number of times that team has won the World Series in the time period from 1903 to 2020. In the program, 2 arrays are needed: TeamList array and Winners array. TeamList array will…arrow_forward
- (C Program - this is not graded)arrow_forward(C++ programming) This is all information for the project You are given a file containing many words. Read in all of the words from the file and insert each word into a searchable ADT. Give the user a looping menu allowing them to search for words in the word list. Searches must be be found in O(1) or constant time. Your code must time the search operations, and display the time to the user. For this assignment, you may use the provided word list or another word list with more than 150,000 words. Include this file with your submission. You must design and implement the following classes: Word: This class holds a single word as a string. Basic getters and setters are required. HashTable: This class represents the hash table for storing many words. Main: This is the driver class. The driver: Create a Hash Table Read in all of the words from a text file into the Hash Table Provide a looping menu for the user to perform searches. Time all searches and display the execution time to…arrow_forwardQ24 (C++): You are to implement a sorting algorithm. Given a list of positive integers, your program will sort the input integers in ascending order. The program specs are given below. (30 pts) What you need to do for submission: a) Implement the program // write some debugging statements to console to get partial credits if your program doesn't work completely. b) Run your program with the given data file in the final exam Part-2 email you received from Dr. Phillips Q24 data c) Name your soft copy: LastnameFirstInitial_Q24_cpp.zip d) Name the hard copy: LastnameFirstInitial_Q24_PDF.pdf ** include in your hard copy: - cover page (without algorithm steps) - Q24 source code - print outFile // see specs below. e) Submit the soft copy and hard copy in the same email to your TA and cc to Dr. Phillips with email subject: (323.33) your first name your last name Q24 specs= I. inFile (use argv [1]): A text file contains integers (not sorted.) II. outFilel (use argv [2]): For sorted input data.…arrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education
Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education
Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON
C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning
Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education
Literals in Java Programming; Author: Sudhakar Atchala;https://www.youtube.com/watch?v=PuEU4S4B7JQ;License: Standard YouTube License, CC-BY
Type of literals in Python | Python Tutorial -6; Author: Lovejot Bhardwaj;https://www.youtube.com/watch?v=bwer3E9hj8Q;License: Standard Youtube License