Assignment 1
Assignment 1
1 UCP asked to OOAD team to design software for employee management. An employee’s information
contains; employee code, name, date of joining, age, experience (no of years). Analyse the problem,
implement (interface and definitions) using C++ classes. Write a main function, create three objects of
employee and enter some data into it through setters and constructors by passing parameters. Then
ask the user to enter current date. Display the names of those employees whose tenure is 2 or more
than 2 years according to the given current date. Note. If we do not know the size of any variable, we
create a pointer
2 Write a class Book with three data members BookID, Pages and Price. It also contains the following
member functions:
The input_values() function used to input values in data members (BookID, Pages and Price)
The set() function is used to set the values of data members(BookID, Pages and Price) using
parameters
The program should create two objects of the class and input the values for these objects.
The first object should get the value of data members (BookID, Pages and Price) through the member
function input() which in non-parameterized member function.
The second object should get the values of data members (BookID , Pages and Price) through member
function set() using parameters.
Lastly the program should display the details of most costly book
3 Create a class called Person that has data members for name, age, and gender.
Create setter and getter methods for each data member.
Define a class called Person with data members for name, age, and gender.
Create a constructor that takes name, age, and gender as parameters and initializes the data
members.
Define setter methods for each data member (set_name, set_age, set_gender) that allow the data
to be modified.
Define getter methods for each data member (get_name, get_age, get_gender) that allow the
data to be accessed