AISSCE PRACTICAL EXAMINATION QUESTION PAPER COMPUTER SCIENCE SUBJECT CODE: 083 DATE: 01/02/13 SCHOOL CODE : 06952 SESSION : FN / AN Q 1. TELEPHONE DIRECTORY SIMULATION Write a C++ program (TELEPHONE DIRECTORY SIMULATION) that can sort list of names and telephone numbers alphabetically. Names to be treated as a unit. (Defne them inside a structure). Persons are to be sorted alphabetically by their frst name. Persons with same name are to be sorted with their last name. Q 2. FUNCTION OVERLOADING: Write a program that overloads the prototype of multiple(), a function that returns mean, median, standard deviation and volume of diferent structures. Write six versions: one for mean, one for median, one for standard deviation, one for cubes volume that takes one side (foat data type) of the cube, one for cylinders volume that takes radius (foat data type) and height (foat data type) of Page 1 of 7
cylinder and one rectangular boxs volume that takes length (foat data type), breadth (foat data type) and height (foat data type) of the box.
Standard deviation (x x ) / N-1 Cylinders volume is r 2 h. Rectangular boxs volume is length*breadth*height. Cubes volume is side 3 . Q 3. CLASS WITH ARRAY OF OBJECTS Defne a class named ADMISSION in C++ with the following descriptions. Use array of objects with least array size. Private members: AD_NO integer (range: 10-2000) NAME array of characters CLASS character FEES foat Public members: Function Read_data() to read an object of admission type. Function display() to display the details of an object. Function DRAW_NOS() to choose two students randomly. Display the details. Use random function to generate admission no to match with AD_NO. Also give a menu to the user which displays randomly selected students, topper and specifc student. Display according to the users requirement. Page 2 of 7
Q4. CONSTRUCTOR AND DESTRUCTOR Imagine a ticket selling booth at a fair where people passing by are parched a ticket. A ticket is priced as 2.50/-. The booth keeps track of the no. of people who have visited the booth and the total amount of the money collected. Model the ticket selling booth with the class called Tic_Booth including following Members: Data Members: No of people visited , Total amount of money collected. Member Functions: To assign initial values (must be special member function ) To increment only the total no. of visitors in case ticket is not sold out, To increment the total no. of visitors as well as the total amount of money collected if a ticket is sold out. To free the memory space after the program used. Q 5. MULTILEVEL INHERITANCE A college maintains a list of its students graduating every year. At the end of the year, the College produces a report that list the following: Year: Number of working graduates: Number of non working graduate: Details of the top most scorers: Name: Page 3 of 7
Age: subject: Average marks: X% of the graduates this year are non working and n % are in frst class. Write a C++ program for it that uses the following inheritance path: Person student Graduate student (Name, age ) (Rollno, avg, marks) (Subject, employed) Q 6. MULTIPLE INHERITANCE Imagine a computer center that maintains the details of the faculty who are working in the center and the details of the students. The center maintains the course details such as its starting date, course completion date and course name. Using multiple inheritance, the class course inherits the details of the student and the faculty. Write a main () program to test the course class by creating the instance for the class. Q7. TEXT FILE 1 Timmy has written a poem of 5 to 10 lines. Now she wants to count the no of sentences, no. of Lines and to fnd the word "the". Write an interactive menu driven program that implements the above task. Page 4 of 7
Q 8. BINARY FILE-1 Write a program with the following specifcation. Create a binary fle to store name and phone number. Give four options to the user : To enter the data for the fle To search the name by giving the phone number To search the number by giving the name Allow the user to change the phone number. Q 9. 2D ARRAY Write a C++ program using function to accept input for 2-d array and display the following: Lower half of an array Product of column Q 10. 2D ARRAY Write a C++ program using function to accept input for 2-d array and display the following: To display the alternative elements Page 5 of 7
To display the upper half of an array Q11. SEARCHING TECHNIQUES Create a 1D array to store minimum of 10 integer values. Get one number from the user to search the given number from the list. Use binary search and linear search methods. Q12. SORTING TECHNIQUES Assume an array student contains element of structure in descending order. Write a C++ menu driven program to arrange the same with the help of bubble sort and selection sort the array and its size is required to be passed as parameter to the function. The user must display the menu as 1. Display by Roll no. 2. Display by marks Q13. ARRAY USING QUEUE Write an interactive menu driven program to perform insert, delete and display operations implement queue technique using a linear array(). Array is used to store integer. Q14. LINKED LIST USING STACK TECHNIQUES Page 6 of 7
Assume each node of a stack containing the following information, in addition to pointer fnder: 1.pin code of the city 2. name of the city Write a structure of node for linked stack in question. Top is the pointer containing topmost node of the stack. Perform the following in the stack: 1. Push a node in the stack 2. Remove the node from the stack. Q 15. CIRCULAR QUEUE Write an interactive menu driven C++ program to implement static circular Queue using a linear array. Queue is used to store integer. INTERNAL EXAMINER EXTERNAL EXAMINER Page 7 of 7