C++ prog code project

Jun 7th, 2015
Price: $250 USD

Question description

1. Have general program comments at top of a program.

  • Program name

  • Programmer Name

  • Purpose

  • Input

  • Output

  • Process/Algorithm

2. NO global variables should be used unless approval obtained.

3. Main function definition should always be the first function listed in the main source/driver program file.

4. Have comments at the end for every variable/constant declared.

5. Have comments at top for every 'user-defined' function.

6. Use naming convention throughout the course. 

  • Lower cases for variables. Use underscore or mixed case for multiple words such as firstName or first_name.

  • Upper cases for constants. Use underscore for multiple words such as TAX_RATE.

  • Choose meaningful identifier name

  • Start class name with an upper case letter

  • in the case of loop count variables the letters i, j, k, etc. may be used

7. All functions need to be prototyped before the main() function or in header file.

8. All variables or constants need to be declared at the top of a function.

9. Clean unused codes when possible.

10. Make your code readable by using blank lines, comment lines and indention.

11. Send ONLY the source code (.cpp, .h) .

Problem:Write a program to create, update, delete and save salesperson records with following IPO specifications. A Salesperson record includes a salesperson's (1)Name, (2) ID Number, (3) Start Year, and (4) Employment Status - Full Time or Part Time.

//Input: Salesperson data

//Output: A data file containing salesperson records


// 1. check file existenace. If no file created before, notify user to create a file first from the menu options. (1 point)

// 2. continue to do (1 point)

//a.  show menu (1 point)

//b.  perform choice from menu

//- create a new file (1 point)

//a. Ask user for the file name

//b. Create the file and close it

//c. Record the file name in the default verficiation file

//- Add a new record (2 points)

//a. Ask user to enter salesperson ID number first

//b. Check the data file to see whether the record exists using the Saleperson ID number

//c. If record not exists, continue adding the record to the file. Otherwise, notify the user.

//- Delete a record (2 points)

//a. Ask user to enter salesperson ID number

//b. Get record from data file

//c. Delete record

//- Update a record (2 points)

//a. Ask user to enter salesperson ID number

//b. Get record from data file

//c. Update record

//- Check a record (2 points)

//a. Ask user to enter salesperson ID number

//b. Get record from data file

//c. Display record

//- Display all records : loop whole file to (2 points)

//a. get record from data file

//b. display record

//- Exit

// until Exit option is chosen

Tutor Answer

(Top Tutor) Mans K
School: New York University

Studypool has helped 1,244,100 students

Review from student
" Totally impressed with results!! :-) "
Ask your homework questions. Receive quality answers!

Type your question here (or upload an image)

1829 tutors are online

Brown University

1271 Tutors

California Institute of Technology

2131 Tutors

Carnegie Mellon University

982 Tutors

Columbia University

1256 Tutors

Dartmouth University

2113 Tutors

Emory University

2279 Tutors

Harvard University

599 Tutors

Massachusetts Institute of Technology

2319 Tutors

New York University

1645 Tutors

Notre Dam University

1911 Tutors

Oklahoma University

2122 Tutors

Pennsylvania State University

932 Tutors

Princeton University

1211 Tutors

Stanford University

983 Tutors

University of California

1282 Tutors

Oxford University

123 Tutors

Yale University

2325 Tutors