Suppose there is XYZ Company and there are different departments like: production, marketing, finance, sales etc. Manager of the company want to know about the detail of the employees who are highly paid from each department. Write a program using the concept of classes to implement the same.
Write a program define an EMPLOYEE class with EmpId, EName and ESalary, Declare an array of five EMPLOYEE objects. Using appropriate function find name of employee who is getting second highest salary.
Create a class student. Take data members: Student name, Registration Number and Total Marks. Create a function that will perform task student is pass or not in exam. If the student is Pass then it should display grade according to percentage
Define a class AUTHOR with the following specifications:
Private members of the class BOOK are:
BOOK NO integer type
BOOKTITLE 20 characters
PRICE float (price per copy)
Define functions:
INPUT() : function to read BOOK_NO,BOOKTITLE, PRICE
PURCHASE(): function to ask the user to input the number of copies to be purchased.
TOTAL_COST() : A function to calculate the total cost for N number of copies where N is passed to the function as argument.
Design a solution pseudocode that will receive student test result
record and print a student test grade report. The student test
record contains the student ID, name and test score (out of
50%). The program is to calculate the percentage of test score
and to print the student ID, name, test score over 50% and its
letter grade. The letter grade is determined as follows:
A=90-100%
B=80-89%
C=70-79%
D=60-69%
F=0-59%
Develop a flowchart that will read in employee’s total weekly
hours worked and rate of pay. Determine the gross weekly pay
by using the formula,
gross weekly pay= total weekly hours worked
*rate of pay
But, if the hours is more than 40, the formula is,
gross weekly pay = (40*rate of pay) + (1.5* (total
weekly hours worked-40) *rate of pay)
Write a program to print the sum of non-primes in the given N numbers. The numbers which are not primes are considered as non-primes.
Input
The first line of input will contain a positive integer (N).
The following N lines will contain an integer in each line.
Output
The output should be the sum of non-primes in the given numbers.
Sample Input 1
5
8
11
96
49
25
Sample Output 1
178
Write a program that will accept the currency value and the name of the country and will display the equivalent in U.S. dollar, based on the given list:
COUNTRY CURRENCY U.S. DOLLAR EQUIVALENT
British Pound 0.6 U.S. dollar
Canadian Dollar 1.3 U.S. dollar
Japanese Yen 140 U.S. dollar
German Mark 1.7 U.S. dollar
Philippines Peso 53 U.S. dollar
Write a program using string functions that will accept the name of the country as input value and will display the corresponding capital. Here is the list of the countries and their capitals.
COUNTRY CAPITAL
Canada Ottawa
United States Washington D.C.
U.S.S.R. Moscow
Italy Rome
Philippines Manila
Write a program that calculates the average number of days a company's employees are absent during the year and outputs a report on a file named "employeeAbsences.txt".
Input for this project:
· the user must enter the number of employees in the company.
· the user must enter as integers for each employee:
o the employee number (ID)
Create a global variable of type ofstream for the output file. Use this variable to open the file employeeAbsences.txt in your program to write data to it.
Sample Output
Display “Enter the number of employees in the company”
Display “Enter the number of employees ID”
Display “Enter the number of days this employee was absent”
Display “Please re-enter the number of days absent”<o:p></o:p>
Display “Please enter the number of days this employee was absent”z