SET I
There are two classes Customer and Customer_details. Customer is defined in the Sales
department containing details about customer id and details about his/her payment.
Customer_details is a Marketing department class containing only net-salary details and
full personal details like gender, name of spouse, number of children, etc. Add code in
the Customer class such that, conversion from one type of customer object into another is
possible. While converting, items which are not there in the source class (like No. of
children when source class is Customer_details), it should take a default value.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
SET II
A file contains names of countries and their imaginary population (in Millions). Country
names and population are separated by white spaces. Write a program which will include
a menu driven functionality for the above file
(a) Display 2 column output with country names left justified and population
right justified.
Country Population
Japan 789125
Egypt 456789
Indonesia 213148
(b) Determine the population for a given country name.
(c) Determine the country name(s) if the population is given.
(d) Update the population.
(e) Calculate total population for all the countries.
There are two classes Customer and Customer_details. Customer is defined in the Sales
department containing details about customer id and details about his/her payment.
Customer_details is a Marketing department class containing only net-salary details and
full personal details like gender, name of spouse, number of children, etc. Add code in
the Customer class such that, conversion from one type of customer object into another is
possible. While converting, items which are not there in the source class (like No. of
children when source class is Customer_details), it should take a default value.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
SET II
A file contains names of countries and their imaginary population (in Millions). Country
names and population are separated by white spaces. Write a program which will include
a menu driven functionality for the above file
(a) Display 2 column output with country names left justified and population
right justified.
Country Population
Japan 789125
Egypt 456789
Indonesia 213148
(b) Determine the population for a given country name.
(c) Determine the country name(s) if the population is given.
(d) Update the population.
(e) Calculate total population for all the countries.
No comments:
Post a Comment