Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Program 1: Name the first program AP7-1.cpp. Both AP7-1.cpp and file AP7-1.txt vwill be submitted through Canvas. Create a C++ program that allows input from

image text in transcribed
Program 1: Name the first program AP7-1.cpp. Both AP7-1.cpp and file AP7-1.txt vwill be submitted through Canvas. Create a C++ program that allows input from the screen and creates a text file called AP7-1.txt. The data elements for input and the data file are employee ID number (int), hours worked (double) and rate of pay (double). Run your program and input (6) rows into your file. Display accurate instructions to the screen so the user inputs the correct data. 245 42.50 19.56 5478 37.50 17.54 Program 2: Name the second program AP7-2.cpp. Both AP7-2.cpp and file AP7-2.csv will be submitted through Canvas Create a C++ program that reads in text file AP7-1.txt and creates a comma separated file called AP7-2.csv. Calculate Gross Pay by multiplying hours worked by rate of pay. The first row in file AP7-2.csv should be headers for each data element The data elements for output in the comma separated data file are employee ID number (int), hours worked (double), rate of pay (double) and gross pay (double). Your output file contents should look similar to: Emp ID #,Hours Worked,Rate of Pay,Gross Pay 1245,42.50,19.56,831.30 5478,37.50,17.54.657.75

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Advanced Database Systems

Authors: Carlo Zaniolo, Stefano Ceri, Christos Faloutsos, Richard T. Snodgrass, V.S. Subrahmanian, Roberto Zicari

1st Edition

155860443X, 978-1558604438

More Books

Students also viewed these Databases questions