Semester : SEMESTER 4
Subject : Object Oriented Techniques
Year : 2020
Term : SEPTEMBER
Branch : INFORMATION TECHNOLOGY
Scheme : 2015 Full Time
Course Code : IT 204
Page:1
> 020001T202052001 Pages: 2
Reg No.: Name:
APJ ABDUL KALAM TECHNOLOGICAL UNIVERSITY
Fourth semester B.Tech examinations (S), September 2020
Course Code: IT204
Course Name: OBJECT ORIENTED TECHNIQUES (IT)
Max. Marks: 100 Duration: 3 Hours
PARTA
Answer any two questions, each carries 15 marks Marks
1 8) Create aclass SHIP with the following specifications. 7
Private Members:
Ship_number 5 digit code
Ship_location 8 digit code
Public Members:
getdata( ) Read number and position
putdata ( ) Display number and position
Using static data find the number of objects created at the time of program
execution.
b) Explain const member functions. 4
c) Differentiate between class and structure in C++. 4
2 a) Design a class DATE containing day, month and year as its data members. 10
Overload + and — operators to add and subtract two DATEs. Also overload =
operator to assign the value of one DATE object to another.
b) Distinguish between implicit and explicit data conversion. 5
3 a) Define a class POINT with two attributes X_point ( integer ) and Y_point 10
(integer). POINT class includes:
1. Default constructor to initialize attribute values to (0,0)
2. Read() function to read values of attributes
3. Norm( ) function to return the point’s distance from the origin (0,0)
4. Print( ) function to display the value of attributes
5. Distance( ) function to find distance between two POINT objects
Implement a C++ program with class POINT to invoke the functions
considering 5 POINT objects. Find the closest among these 5 objects.
b) List functions for finding string objects. 5
Page 1 of 2