ATSS's Institute of Industrial & Computer Management & Research, Nigdi. Academic Year - 2019-2020 MCA I - Semester - I LAB Assignment
ATSS's Institute of Industrial & Computer Management & Research, Nigdi. Academic Year - 2019-2020 MCA I - Semester - I LAB Assignment
Sr.
Name Of Program
No.
Write a program to check for given number
1 a) Prime
b) Pallindrome.
c) Perfect number.
a) Strong Number (Ex: n=145=> 1! + 4! + 5! = 1 + 24 + 120 = 145)
2 b) Amstrong Number (Ex:33 + 73 + 13 = 371)
c) Read number from user and print its equivalent String (Ex. 145 One Four Five)
1
Define class Point with x,y,z coordinates and having following member functions
a. Constructor (Default argument , parameterized , copy)
8 b. Addition of Two points.
c. Distance between two points
d. Compare two points.
Write a program using function AREA () that is used to calculate area of triangle, rectangle,
9 pentagon, hexagon & circle. (Use function overloading).
Define class Time with Hours and minutes as members. Write a program to
a) Add two time Objects t1 and t2.
b) Modify/Change/Set time.
10 c) Find difference between two Time.
d) Convert time to 12 hrs/24 hrs.
e) Take Minutes and convert it into Time.
f) Convert Time to Minutes/Seconds
2
Design a class string that will store array of characters provide suitable constructors and over loaded
operator
a. Operator + to concatenate two strings.
b. Length of String.
14 c. Overload unary ++ and -- opreator
d. Particular character is present or not if present return first occurrence position.
e. Operator < and > to compare two strings.
f. Operator [ ] to return ith character.
g. Operator = = to check equality of two strings
h. Insertion and Extraction operators
Define Sequence class that contains three data members length of the sequence , starting element of the
15 sequence and an array containing elements of the sequence. And Create_Seq member function that takes
length and starting element as argument, Display Function and Compare_seq function.
Design a class Employee having following data members
a. EMP_ID ,Name, Department,DateOfBirth
Write a menu driven program to do following task
16 a. Add a Employee record,
b. Display Employee record Department wise
c. Display particular Employee if EMP_Id given
d. Modify record
Use Local nested class to create data member DateOfBirth.
17 Define two classes Celsius and Fahrenheit. Write conversion function to carry out conversion from
one class type to another.