Declare the class Employee, consisting of data members are emp_number, emp_name, department, salary and net_salary. The member functions are GetEmpDetails() to accept information for an employee, Calculate_DA() to calculate DA=20% of salary and display() to display the information of a employee.
The Admission to a professional course is done using the following conditions.
a) Marks in Maths> =60
b) Marks in Physics >=50
c) Marks in chemistry >=40
d) Total in all the three subjects >=200 (or) Total in Maths and Physics >=150
Given the marks of three subjects, write a C++ program to process the applications to list the eligible candidates.
Display students details in the following format using manipulats
Rollno Name Marks average
------ --- ---- -------
1 Ram 490 98.17
2 Kala 450 96.23
Write a function second_last_digit in C++ and call function that print the second last digit of the given number. The second last digit is being referred to the digit in the tens place in the given number.
For example, if the given number is 197, the second last digit is 9.
Note 1 - The second last digit should be returned as a positive number. i.e. if the given number is -197, the second last digit is 9.
Note 2 - If the given number is a single-digit number, then the second last digit does not exist. In such cases, the program should print -1. i.e. if the given number is 5, the second last digit should be print as -1.
Write a function second_last_digit in C++ and call function that print the second last digit of the given number. The second last digit is being referred to the digit in the tens place in the given number.
For example, if the given number is 197, the second last digit is 9.
Note 1 - The second last digit should be returned as a positive number. i.e. if the given number is -197, the second last digit is 9.
Note 2 - If the given number is a single-digit number, then the second last digit does not exist. In such cases, the program should print -1. i.e. if the given number is 5, the second last digit should be print as -1.
Develop a code for the hybrid Inheritance diagram given below
· The employee details class consisting of data members such as name and emp_id.
· The normal pay class consisting of data members such as basic salary.
· The additional pay class consisting of data members such as hours, rupees and additional pay.
· The net pay class consisting of member function cal() to find the employee total salary = additional pay + basic salary.
The fill character is set to sign “#”. The set() properties are set to internal and scientific. The scientific properties display the number in float format. The internal properties display the sign before blank spaces. Develop a C++ program to implement it. # # # - 7 8 4 . 5 0
3197, the third last digit is 1.
Note 1 - The third last digit should be printed as a positive number. i.e. if the given number is -197, the third last digit is 1.
Note 2 - If the given number is a single-digit or double-digit number, then the third last digit does not exist. In such cases, the program should print -1. i.e. if the given number is 5, the third last digit should be print as -1.
Base class: College
variable: cname, city
Funciton: get(), display()
Derived class inherited from college: Department
variable: dname
function :get(), display()
Base class: Education
variable: Degree, University
function : get(), display()
Derived class inherited from college and education: Teacher
variable: Teacher
tname function : get(), display()
Write a C++ program to display the details of faculty members in an institution.
The postage for ordinary post is Rs. 2.00 for the first 15 grams and Rs. 1.00 for each additional 10 grams. Write a C++ program to calculate the charge of postage for a post weighting N grams. Read the weights of N packets and display the total amount of postage using multiple inheritance.
* Base class-1: Member variables are name, source and destination.
* Base class-2: Member variables are no. of packets and weight.
* Derived class: Member functions display(), displays the name, source, destination, total weight and total amount.