Subscribe to Blog via Email

Question:

A class Admission contain the admission numbers of 100 students. Some of the data members/ member functions are given below:

Class name: Admission

Data member/instance variable:

Adno[ ]: Integer array to store admission numbers

Member functions/methods:

Admission(): constructur to initialize the array elements
void fillArray(): to accept the element of the array in ascending order
int binSearch(int l, int u, int v): to search for a particular admission number(v) using binary search and recursive technique and return 1 if found otherwise returns -1

Specify the class Admission giving details of the constructor, void fillArrray() and int binSearch(int, int, int). Define the main() function to create an object and call the functions accordingly to enable task.

Output:

Note: The output has been taken for 5 elements in the array

Enter Admission number in ascending order
Enter Admission no of student 1: 205
Enter Admission no of student 2: 310
Enter Admission no of student 3: 670
Enter Admission no of student 4: 887
Enter Admission no of student 5: 952
Enter an Admission number to search : 887
*****************************
Admission Number found

You have been using too many pseudonames and wrong e-mail addresses. Anyone doing that is blocked.

Points to note for everyone: There are hundreds of e-mails received everyday and hundreds of comments posted daily. We are very thankful to our readers for that. But, we should keep in mind, that the teacher in charge of this website is not always online to reply to everyone’s queries the moment it is posted. The reply is posted when the teacher gets time from his busy schedule of teaching.
Also if any comment is deemed unnecessary by the admin, then it is removed.

Sir,in Question 10th (WordPile)……..it was given maximum of 20 elements……but then in constructor we were asked to create the WordPile with size as ‘capacity’…..so I’ve initialized “ch=new char[capacity]” inside the constructor and wrote a comment..”//Assuming capacity <= 20"…….and nowhere did I initialize the size equal to 20.I hope I will get full marks.Will I?

And thank you for all the hardwork you did for helping students like me…..your website is a great help to all of us…Thanks a lot…..:)

thankyou sir for replying,,,,sir in section b i attempted all questions
in concatination one i used in the concat function
int num=””+n1+n2
how many marks will be deducted and which of these 2 would be selected
also sir in question number 3 b part i wrote that it was calculating lcm,,,,,is it correct

by these two i mean assuming my one program to be completely correct in section b ,,,,,,which one has the most chance of scoring more marks,,,,,concatination one or binary function one,,,,,also i used string tokenizer in the consonants calculation one ,,,,,is it correct,,,,,,please reply sir i am feeling very nervous

Using StringTokenizer is perfectly fine. It is specifically mentioned in the ISC syllabus.
Regarding which of your answers would be selected, then it depends on the severity of the mistakes done in them.
Regarding Question 3 (a) part (iii) then it is printing the prime factors of x.

ICSE | ISC Sample Papers

In this section we will be providing you with the Sample/Guess papers of ICSE (Computer Applications) and ISC (Computer Science) which can be easily downloaded. We hope that the students will benefit from these resources.