B.E/B.Tech DEGREE EXAMINATION, NOVEMBER/DECEMBER 2007
Fourth Semester
Electrical and Electronice Engineering
CS 1261 OBJECT ORIENTED PROGRAMMING
(Regulation 2004)
Time: Three hours Maximum marks: 100
Answer ALL questions
PART A (10 x 2 =20 marks)
1. In the following code,how do you obtain the fractional part for the division operation by maintaining 'i' as an integer? Also write the output.
int i;
for ( i = 0; i <20; ++ i )
printf (%d",i/2);
2. What is inline function ?
3. When are base class and derived class constructor and destructor functions called ?
4. Can you use a 'this' pointer to a friend function ? Comment on it.
5. Create a situation when the complier is unable to choose between two overloaded function.
6. Compare and contrast early and late binding.
7. How do Java deal with the common situation of, Wanting a class to reflect the behavior of two parents.
8. When do you want to declare a class in a package public?
9. Show that if x and y are String objects and x == y is true, then x equals (y) is also true.but reverse is not necessarily true.
10. Identify the problem with the following constructor of an applet.Assume the GUI objects are all properly declared in the data member declaration section.
Public My Applet ( )
{
//create objects
textField = new TextField( );
label = new.Label( );
label.addActionListener(this);
}
PART B (5 x 16 = 80)
11 (i) Differentiate procedure oriented programming and Object oriented programming. (6)
(ii) Why do you need function prototyping ? Write a program using function prototyping that returns the last occurrence of a character c in string s.(10)
(or)
(b) (i) How do you pass structure members and an entire structure to a function ? Give Examples.(8)
(ii) What is the purpose of scope resolution operator ?(4)
(iii) How do you include various instructions to the compiler in the source code of a C++ program ? (4)
12. (a) (i) Consider a student registration program used by the registrar's office.The program keeps track of student who are registered for a given semester.For each student registered , the program maintains the student's name and address, phone number,the no of classes in which the student is enrolled ,and total credit hours.The program also keeps track of the total number of registered students.Define a Student class that is suitable for this program write a main function to demonstrate.(10)
(ii) Suppose the minimum and maximum number of courses for which a student can register is different depending on whether the student is a graduate,under graduate or working .Redo the above for different types of students.Relate the classes using inheritance. (6)
(or)
(b) (i) Discuss the technique of granting a nonmember function access to the private members of a class .Give example.(12)
(ii) What are the two important restrictions that apply to friend function ?(4)
13 (a) What is operator overloading ? Write a C++ program to overload any arithmetic unary operator and some binary operators.What are the restrictions that are imposed on overloading operators ?(3+10+3)
(or)
(b) (i) What is virtual base class ? Create a situation where you will use virtual base class.(8)
(ii) What is a virtual function ?When do you use a pure virtual function ?Differentiate them.(8)
14. (a) (i)What a Java application that inputs temperature in Celsius and displays the temperature in Fahrenheit .(6)
(ii) Write an application that computes the area of a cicular region between an inner circle and an outer circle. Define an instantiable circle class that has methods to compute the area and circumference. Set the circle's radius with the setRadius method.
(or)
(b) Declare an array of float of size 365 to store daily temperature for one year.Write the code to find
(i) The hottest and coldest days of the year,
(ii) The average temperature of each month,
(iii) The difference between the hottest and coldest days of every month.
(iv) The temperature of any given day.The day is specified by two input values : month (1...12 ) and day ( 1...31 ).Reject invalid input values.(16)
15. (a) (i) Discuss the method of placing GUI objects on applets.(6)
(ii) Write an applet that acts like an adding machine.The user enters numbers one at a time.When the user presses the ENTER key or clicks on the Add button after each entry,the applet adds the number to the running sum.Display the running sum using a label objects.(10)
(or)
(b) Discuss the following concepts with illustration. (4 X 4 = 16)
(i) Creating a thread
(ii) Stopping a thread
(iii) Pausing a thread
(iv) Determine when the current thread has finished.
November 3, 2011
CS1261 OBJECT ORIENTED PROGRAMMING question papers Anna university NOVEMBER/DECEMBER 2007 question papers Download
Subscribe to:
Post Comments
(
Atom
)
Labels
Accenture
Admission Notice - 2010
Admission Notification
Anna University
Anna University Chennai
Anna University Question Papers
Anna University Trichy
Apparel Technology and Management
Aptitude Questions
Arts and Science Colleges
Biomedical Engineering
C and CPP Ebooks
Calicut University
CBSE Question papers
Civil Engineering
Civil Service Exams
Colleges in India
Colleges Result
Computer Science Engineering
Core Jobs
CS R2008
CSE
CSIR NET
EBooks Download
ECE
EEE
EIE
Electives
Electrical and Electronics Engineering
Electronics and communication
Electronics and Instrumentation Engineering
Engineering
Engineering Colleges in Maharashtra
Engineering Colleges in TamilNadu
Engineering Admissions
Engineering Colleges
Engineering Colleges in Karnataka
Engineering Jobs
Engineering Syllabus
Entrance Exam Dates
Entrance Exam Results
Entrance Examination
Exam Time Table
Experiencer
First Year Syllabus
Freshers
Full Time Jobs
Government jobs in india
Hardware and Networking Jobs
Hotel Management and Catering Technology
IGNOU
Information Technology
INTEVIEW QUESTIONS
IT Jobs
JNTU Question Papers
Jobs in Bangalore
Jobs in Chennai
Jobs in Coimbatore
Jobs in Delhi
Jobs in Hyderabad
Jobs in India
Jobs in Kerala
Jobs in Noida
Jobs in Tamilnadu
Jobs in TATA
Karnataka Educations
Lab Manuals
Mechanical Engineering
Medical Colleges
Placement Papers
Plus 2
Preparation for exams
Private Jobs in India
Question Papers
Question Papers Download
Results Announcement
Semester 1
Semester 2
Semester 3
Semester 4
Semester 5
Semester 6
Semester 7
Semester 8
Syllabus
Syllabus Download
Tamil Movie
TCS Placement Papers
Teaching Jobs
TECH MAHINDRA
Textile Technology
Top colleges
University Results
UPSC
VICEVESVARAYA TECHNOLOGICAL UNIVERSITY
waec
Walk-in Interview
Web Designers
Followers
Archive
- ► 2012 ( 1032 )
-
▼
2011
(
736
)
-
▼
November
(
228
)
-
▼
Nov 03
(
13
)
- EE1401 POWER SYSTEMS OPERATION AND CONTROL questi...
- EE1401 POWER SYSTEM OPERATION AND CONTROL questio...
- CS1261 OBJECT ORIENTED PROGRAMMING question paper...
- CS1261 OBJECT ORIENTED PROGRAMMING question paper...
- Clerical Job Openings 2011 – Tamilnad Mercantile B...
- Goverment Jobs in C.P.W. (Semi-Skilled) Positions ...
- Rajiv Gandhi Institute of Petroleum Technology Adm...
- Freshers Job Openings at Shillong Cantonment Board...
- Stenographer III Post at Department of Defence Pro...
- University of Lucknow admission 2011-2012 Result 2...
- YMCA University of Science and Technology,Admissio...
- Board of Secondary Education Class X Supplementary...
- EC1313 LINEAR INTEGRATED CIRCUITS question paper...
-
▼
Nov 03
(
13
)
-
▼
November
(
228
)
0 comments :
Post a Comment