Page 610 - Computer science 868 Class 12
P. 610
Program 17 Print Best of Four from ISC Scores
A class Icsscores defines the scores of a candidate in six subjects and another BestFour
defines the best four subjects
Class Name : Iscscores
Data Members
int number[6][2] : to contain marks of 6 subjects and subjects codes
Member Methods
Iscscores() : constructor to assign 0 to array
void input_marks() : to accept the marks and subject scores to each subjects
int point() : to return the point in each subjects according to the
following:
Marks points
>=90 1
80-89 2
70-79 3
60-69 4
50-59 5
40-49 6
<40 7
Class Name : BestFour
Members Method
BestFour() : Constructor to initialise data members
void BestSubjects() : to display the total point and best Four subjects codes
using the concept of inheritance
1 import java.util.*;
2 class Iscscores
3 {
4 int number[][];
5 int k;
6 Iscscores()
7 {
8 number=new int [6][2];
9 k=0;
10 }
11 void input()
12 {
13 Scanner sc = new Scanner(System.in);
14 for(int i=0;i<6;i++)
15 {
16 System.out.print("Enter Subject Code: ");
608608 Touchpad Computer Science-XII

