Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a complete C++ program that defines the following class: Class Salesperson public: Salesperson(); constructor // destructor -Salesperson)I Salesperson(double q1, double q2, double q3, double

Write a complete C++ program that defines the following class:

image text in transcribed

image text in transcribed

Class Salesperson public: Salesperson(); constructor // destructor -Salesperson)I Salesperson(double q1, double q2, double q3, double q4); II constructor void getsales();I Function to get 4 sales figures from user void setsales( int quarter, double sales); I/ Function to set 1 of 4 quarterly sales // figure. This function will be called II from function getsales () every time a I/ user enters a sales figure. This function /I will also finds total annual sales void printsales); IIThis function will be called from main) function to print // the total sale. Use formatted output to print the total sale up // to two decimal digits as follows: The total annual sales are: //$3679.67 void ReadFile( ); // Reads file Hw7-1.txt" and displays it on the //screen. void EditFile();IIAsks the user to enter a sentence (80 characters or less) // to be added to the "W7 1.txt', file. private: double sales [4]; /quarterly sales figures int main () Salesperson s, z(a, b, c, d);lIvalues a, b, c, and d are set by the user using cout/cin. s.getsales(); s.printsales(); z.printsales); z.ReadFile); z.EditFile); return 0

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_2

Step: 3

blur-text-image_3

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

Graph Databases In Action

Authors: Dave Bechberger, Josh Perryman

1st Edition

1617296376, 978-1617296376

More Books

Students also viewed these Databases questions

Question

How many Tables Will Base HCMSs typically have? Why?

Answered: 1 week ago

Question

What is the process of normalization?

Answered: 1 week ago