Write a program to create a class “department” that stores the department name and department id as its private member. Derive a class “employee” from department which is having employee name, age and employee id. Derive another class “accounts” from “department” in protected mode which is having monthly basic salary, DA(15% of basic salary ) and HRA (10% of basic salary ). Display all the details of an employee along with monthly salary (basic salary+ DA +HRA) using necessary member functions.
In South Africa, buses are used as one of the main transport services for people in the country. Everyday, thet follow the same route from a particular town/city/shopping complex etc., to another location point.
Create an application that uses a recursive function to:
- Allow the bus driver to accept payments from passengers.
-Check every bus stop to ensure that it knows whether or not a passenger should still be in bus or off.
The system should:
-use a recursive function to keep accepting passengers in each bus stop until the second last stop.
-be aware of how many stops are left.
Assume that there are seven bus stops from the starting point to the last point.(excluding the starting and the last point)
You have an ordered linked list with 5 object of type person in it.
Explain with an example of how to add and delete a person in an ordered list. Your list should remain ordered after the insertion and after the deletion of the item.
Note: a Person in this case should be an object that has name, surname, age and gender
Write a program to create a class “department” that stores the department name and department id as its private member. Derive a class “employee” from department which is having employee name, age and employee id. Derive another class “accounts” from “department” in protected mode which is having monthly basic salary, DA(15% of basic salary ) and HRA (10% of basic salary ). Display all the details of an employee along with monthly salary (basic salary + DA + HRA) using necessary member functions.
An arrayList is one of the most important data structures used in many applications.
Define and show the implementation of the functions of an arrayList.
Write a C++ program that takes an integer input and returns the following number.