Suppose you are a small company called software-R-Us. Your company needs to track sales of your new games.

computer science

Description

 

1)      Please create a C++ program for the following: (30 points)

a.      Suppose you are a small company called software-R-Us. Your company needs to track sales of your new games. You need to ask the program manager to input the following for each sale and keep entering data until the user supplies a sentinel value of your choosing:

                                                              i.      Salesperson (give the user a choice of Fred, Alice or  Jamal).

                                                            ii.      Game sold - user choices are

1.      Blazing (sales price $30

2.      FireAway (sales price $25)

3.      CatDog (sales price $20)

                                                          iii.      Date of sales

b.      Create a user-created function called printResults whereby all the data generated is passed to a file call runningSales.txt. The output should be spaced so that it has uniform field sizes.

c.       Print out the totals for each salesperson to the screen and to the runningSales.txt file.

2)      Create a struct called employees that captures the following: (20 points)

a.      First name

b.      Last name

c.       Employee number (must be an int)

d.      Department

e.      Annual salary

Note: no need to create a whole program – just merely show how you would setup the struct with the correct parameters.

 


Related Questions in computer science category