Question

problem specification: writing in c++ language ... Question Problem Specification: Writing in c++ language write a...

problem specification: writing in c++ language ...

Question

Problem Specification: Writing in c++ language

write a program that will define a structure consisting of the following data members, “fields”:

- name

- hours worked

- hourly rate

Use a structure to implement the following:

-Use a function to read the name, hours and rate, passing them by reference to the

main function.

-Call a function to print, this function accepts the entire structure by value.

This function will call a function that will return the

grosspay, a local variable in print(function), by multiplying the hours by the rate.

The function then prints each data member on a separate line followed by the

grosspay

Input of the program:

- name(cin, getline);

- Hours worked

- Hourly rate

Output should go to a file and should be a report like follows:

Employee Name:        Jim Donavan

Hours worked:

40.00

Hourly Rate:

$      9.75

Total Wages:                                                $ 390.00

Structure implementation

10 points Good programming practices: Proper spacing, comments, use of variables, and typedef, indentation and programs appearance.

5    points Descriptive names are used.

5    points Hierarchical chart is handed-in and is correct.

5    points the function that reads the data passes the values entered back into the structure.

5    points the function that calculates, returns the gross as its value to the gross member.

5    points the function that prints accepts the entire structures value, prints all the members on a separate line each and the grosspay.

5    points test results are handed in.

10 points program designed as specified, runs and produces the correct results.

0 0
Add a comment Improve this question Transcribed image text
Request Professional Answer

Request Answer!

We need at least 10 more requests to produce the answer.

0 / 10 have requested this problem solution

The more requests, the faster the answer.

Request! (Login Required)


All students who have requested the answer will be notified once they are available.
Know the answer?
Add Answer to:
problem specification: writing in c++ language ... Question Problem Specification: Writing in c++ language write a...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Similar Homework Help Questions
  • in C language we need to find the following : EXERCISE 3: 1. Write the definition...

    in C language we need to find the following : EXERCISE 3: 1. Write the definition of a structure named employee that contains character array members for an employee's first and last names, an int member for the employee's age, a char member that contains 'M' or 'F' for the employee's gender, and a double member for the employee's hourly salary. 2. Using the above mentioned definition, write a C program that asks a user to enter the values of...

  • I NEED ALL QUESTIONS OR ELSE THUMBS DOWN! C++ Implement a structure Employee. An employee has...

    I NEED ALL QUESTIONS OR ELSE THUMBS DOWN! C++ Implement a structure Employee. An employee has a name (a char *) and a salary (a double). Write a default constructor, a constructor with two parameters (name and salary), and methods char* getName() double getSalary() to return the name and salary. Write a small global function TestEmployee() to test your structure. Creating a new employee. Please type the name: Larry Bird Please specify the salary: 200000 New employee has been created....

  • PYTHON Write a function called hourly_employee_input that asks the user for a name (string), hours worked...

    PYTHON Write a function called hourly_employee_input that asks the user for a name (string), hours worked (int) and an hourly pay rate (float) and prints a string including the information. Call the function, entering expected values, numbers in appropriate range Call the function, entering negative numbers Call the function, entering bad input (letters, symbols) What do you need to add to your function for bad input? Handle the bad input so your program doesn't end when receiving bad input

  • I need help with my homework please. I should write this program in C++ language and...

    I need help with my homework please. I should write this program in C++ language and use Inventory.h file (header file), Inventory.cpp file (implementation file), and main.cpp file (main program). This is the program: Demonstrate the class in a driver program. Input validation, don’t accept negative values for item number, quantity, or cost. 6. Inventory Class Design an Inventory class that can hold information and calculate data for items ma retail store's inventory. The class should have the following private...

  • Design a PayRoll class that has data members for an employee’s first and last name, hourly...

    Design a PayRoll class that has data members for an employee’s first and last name, hourly pay rate, number of hours worked. The default constructor will set the first and last name to empty string, and hours worked and pay rate to zero. The class must have mutator functions to set each of the data members of the class and accessors to access them. The class should also have the following member functions: displayPayroll function that displays all data members...

  • Write this program in C language Ensure the program output is exactly as described, and that...

    Write this program in C language Ensure the program output is exactly as described, and that the whitespace of your source code is well formatted. Utilise good naming practices when declaring variables. EXERCISE NAME: Recursive Movie In the history of Jurassic Park movies the following movies were released: Movie's Name: Jurassic Park The Lost World: Jurassic Park Jurassic Park III Jurassic World Year of Release: Rotten Tomatoes: 1993 93% 1997 51% 2001 50% 2015 72% Implement a structure type named...

  • PYTHON PROGRAMMING LANGUAGE (NEEDED ASAP) Using a structured approach to writing the program: This section will...

    PYTHON PROGRAMMING LANGUAGE (NEEDED ASAP) Using a structured approach to writing the program: This section will guide you in starting the program in a methodical way. The program will display a window with GUI widgets that are associated with particular functions: Employee Payroll O X -- - - - - - - - - - - Show Payroll Find Employee by Name Highest Lowest Find Employee by Amount Write Output to Fie Cancel - -------- ------------- Notice that some of...

  • LANGUAGE: JAVA Sorting an array: 2. Write a program that asks the user for 5 numbers...

    LANGUAGE: JAVA Sorting an array: 2. Write a program that asks the user for 5 numbers and stores them in an array called data. Then call a method that accepts the array as an argument, sorts the array in ascending order and prints out the original AND sorted array (Hint: The method does not return anything in this case, so it should be set to void).

  • Objective: Learn how to -- read string from a file -- write multiple files Problem: Modify...

    Objective: Learn how to -- read string from a file -- write multiple files Problem: Modify the Person class in Lab #4. It has four private data members firstNam (char[20]), day, month, year (all int); and two public member functions: setPerson(char *, int, int, int) and printInfo(). The function setPerson sets the first name and birthday in the order of day, month and year. The function printInfo prints first name and birthday. But it should print the date in the...

  • Problem Specification: Write a C++ program to calculate student’s GPA for the semester in your class. For each student, the program should accept a student’s name, ID number and the number of courses...

    Problem Specification:Write a C++ program to calculate student’s GPA for the semester in your class. For each student,the program should accept a student’s name, ID number and the number of courses he/she istaking, then for each course the following data is needed the course number a string e.g. BU 101 course credits “an integer” grade received for the course “a character”.The program should display each student’s information and their courses information. It shouldalso display the GPA for the semester. The...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT