STJOHNS SCHOOL
| Subject: Java Programs isc icse bluej questions for practice Tue Jan 19, 2010 8:25 pm | |
| Q1. A class performance is defined, for finding out the mode and the modefrequency.
mode = the most frequently occurring mark in the class. If two or more marks occur equally frequently then the highest of these marks is the mode
modefrequency: - frequency at mode
you can make following assumptions:- the class has 10 students, the maximum marks anyone can get are 100 and minimum is 0, all the student marks are whole numbers.
Important:- You are not allowed to sort the marks.
Some of the member functions/methods of performance are given below:
Class name Performance Data members : marks[ ] an integer array to store the marks of 10 students. mode – to store the mode
freqatmode- to store the frequency at node
Member functions :
Performance() Constructor
Void readmarks() for reading the marks into the array
int getmode() for finding and returning the mode
int getfreqatmode() for returning the frequency at mode
void calcmodeandfrequency() a single function that calculates both mode and
frequency at mode. Write all the functions and write main() also. |
|