Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

C++ Assignment: Assignment Write a complete program to calculate painting costs for customers of Top Quality Home Painting Service. Function 1: Read the data for

C++ Assignment: image text in transcribed

Assignment Write a complete program to calculate painting costs for customers of Top Quality Home Painting Service. Function 1: Read the data for one job from a file (see data below). Validate that none of the numbers are negative. Return the data from good records to main and write error records onto a separate file. Function 2: Determine the cost for interior painting, the cost for exterior painting, and the cost for the entire paint job. Any painting estimate greater than $1000.00 receives a 10% discount. Return all calculated values to main. Function 3: Label and output all good data (customer initials, customer account number, interior square feet, cost per interior square feet, exterior square feet, cost per exterior square feet, total interior cost, total exterior cost, any discount and total cost) to the screen. Input Input data from a file. One record of data contains the following sequence of data: ABC 1234 400 3.50 850 5.50 3 customer initials, customer account number (4 digit integer), the number of interior square feet to be painted, the cost per square foot for interior painting, the number of exterior square feet to be painted, the cost per square foot for exterior painting. Create the data file below using your text editor or Notepad. GHI Data File ABC 1234 DEF 1345 2346 JKL 4567 MNO 5463 POR 679 STU 6879 VWX 7348 XYZ 9012 400 100 200 375 200 3.50 5.25 10.00 4.00 -5.0 0.0 0.0 0.0 5.00 850 200 0 50 150 100 -100 750 -50 5.50 2.75 0.0 4.00 3.00 3.50 0.0 0.0 5.00 0 100 0 -24 Output Output and label all input and calculated data (three initials, customer account number, interior square feet, cost per interior square feet, exterior square feet, cost per exterior square feet, total interior cost, total exterior cost, any discount, and total cost) to an output file. Output valid data to one file and errors to an error file

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

Database Concepts

Authors: David Kroenke, David Auer, Scott Vandenberg, Robert Yoder

9th Edition

0135188148, 978-0135188149, 9781642087611

More Books

Students also viewed these Databases questions

Question

Why do HCMSs exist? Do they change over time?

Answered: 1 week ago