November 3, 2011

CS1261 OBJECT ORIENTED PROGRAMMING question papers Anna university NOVEMBER/DECEMBER 2007 question papers Download


Fourth Semester
Electrical and Electronice Engineering


(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( );



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)
(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)
(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)
(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.
(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)
(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.



Post a Comment

Get Syllabus in your Mail


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



Anna university Engineering Syllabus

Earn Money From Online

Government jobs in india

Admission Notification

Total Pageviews


Privacy Policy use third-party advertising companies to serve ads when you visit our website. These companies may use information (not including your name, address, email address, or telephone number) about your visits to this and other websites in order to provide advertisements about goods and services of interest to you. If you would like more information about this practice and to know your choices about not having this information used by these companies, click here.