Write program to compute salary of employee

Assignment Help Programming Languages
Reference no: EM1369659

You are required to write a program which will calculate the salary of an employee according to his/her grade assigned by the employer. You must declare a class named CalSalary whose private data members will be employee ID, employee name and employee grade. Also write a constructor, setter and getter functions for all private data members and a function that will calculate the salary.

Detailed Description:

• Employee ID and grade should be of type integer. Employee name should be of type string.
• Constructor should initialize employee ID and grade with value zero and employee name with value NULL.
• For assigning or extracting values from private data members, you must use getter and setter functions.
• Declare a public member function named calculate which will calculate the net salary of the employee according to his/her grade.
• Formula for calculating actual salary is (Basic Salary) + 45% of basic salary.
• If the grade of employee is 17, then the basic salary is 15,000.
• If the grade is 18, then the basic salary is 20,000 and if grade is 19 then the basic salary is 25,000.

Reference no: EM1369659

Questions Cloud

Why is it that grazing land was not protected by families : This grazing land was for whole town and families could allow their flock of sheep to graze free of charge. Why is it that grazing land was not protected by individual families.
Explain pay for performance is just as important : Explain Pay for performance is just as important in non-for-profit organizations and Assume you are founder of a non-profit public charity of your choice.
What should zelnick and conroy do : What should Zelnick and Conroy do. Should BMG integrate. Should they continue to work with a wide array of technology partners.
Determine standard methods used in macroeconomics : Derive LM curve through one of the standard methods used in Macroeconomics. Be sure to label all axis and curves on your graph. Describe in writing to what your derivation brings equilibrium and how it accomplishes this.
Write program to compute salary of employee : Write a program to compute the salary of an employee according to his/her grade assigned by employer. You should declare class named CalSalary whose private data members will be employee.
What is joint profit-maximizing level of output : Suppose both firms have entered industry. What is joint profit-maximizing level of output. How much will each firm produce. How would your answer change if firms have not yet entered industry.
Find a news article about a fortune five hundred company : Find a news article about a Fortune 500 company and its CEO that illustrates ethical behavior and Is there any evidence that his or her company's productivity
Characteristics of pure monopoly & monopolistic competition : List the basic characteristics of pure monopoly, monopolistic and oligopoly competition. Under which of these market classifications does each of following most accurately fit?
What are coral reefs status of coral reefs threats to coral : What are coral reefs Status of coral reefs Threats to coral reefs Uses of coral reefs what is a Coral Reef. Fleshy sac topped with ring of tentacles around central mouth opening what is a Coral Reef.

Reviews

Write a Review

Programming Languages Questions & Answers

  Program to calculate the electricity bill

Write a program to calculate the electricity bill. The rates of electricity per unit are as follows: If the units consumed are equal or less than 100, then the cost is Rs 8/- per unit.

  Identify entities of web site used for ordering a product

Identify a web site used for ordering a product or service and then identify the various entities. As an example when you go to Amazon.com and review products.

  Write liberty basic to make payment of current balance

Makes a payment equal to 5 percent of current balance suppose the customer makes no new purchases. Must be written in Liberty Basic.

  Write program to simulate bank transaction

Write a program to simulate a bank transaction. There are two bank accounts: checking and savings. First, ask for the initial balances of the bank accounts.

  Program to read list up to hundred addresses

efine a class called address_t with members for the four integers. Your program should read a list up to 100 addresses and nicknames terminated by a sentinel address of all zeros and nickname.

  Write a paper on memory management

Write a paper on Memory Management

  Write function that takes array of positive integers

Write a function that takes an array of positive integers and the size of the array, and returns the average (type float) of the values.

  Write pseudocode for finding grade of a student

Write pseudocode for finding grade of a student given his/her total score. The program must display a grade of A if the score is above 85, a B if it is between 85 and 75, a C.

  Input number by user and display positive and negative

Input a number entered by the user and display "positive" if it is greater than zero, "negative" if it is less than zero, and "zero" if it is equal to zero.

  Write procedure list-records whihc returns list of records

Write a procedure called list-records which returns a list of all records by artist from a list of records containing several artists.

  Design classes account-checkingaccount and savingsaccount

Design and write 3 classes - Account, CheckingAccount, and SavingsAccount. Have CheckingAccount and SavingsAccount inherit from Account.

  Estimate the storage space for telephone book

Estimate the storage space (number of bytes) required for each of the following items: A telephone book with 10,000 entries consisting of names, addresses and phone numbers. Use your phone book to estimate the average length of an entry.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd