SlideShare ist ein Scribd-Unternehmen logo
1 von 3
Assume that the maximum number of students in a class is 50. Write a program that reads
students' names followed by their test scores from a file and outputs the following: a. Class
average. b. Names of all the students whose test scores are below the class average, with an
appropriate message. c. Highest test score and the names of all of the students having the highest
score.
Sample given from text file:
Johnson 76
Miller 90
Duffy 95
Robinson 45
Ashtony 63
Goofy 89
Pluto 95
Mickey 72
Billy 76
Danny 56
Balto 95
Roony 87
Doc 67
Minne 95
Duckey 72
Andy 76
Solution
Solution : For coding the program of students, just follow the various steps -
Step 1 - Create a class student_score which calculates the students score. For example - public
class student_score
Step 2 - Create a main method function in which define a array of double size for storing
students score and create a object of name and initialize the variables and integers. For example -
double [] score = new double[50];
string [] name = new string[50];
int i,j;
Step 3 - Take input from user using scanner. For example - scanner read_name = new
scanner(sys.in); // similarly read score and other data of student.
Step 4 - Use do for storing and reading of student name and score. For example - do {
i++;
counter++;
// display the student_name and student_score
}
Step 5 - Set initial value of score to array element and then compare one by one.
Step 6 - For calculating highest score sum all of the score. For example - sum_score = sum_score
+ student_score[g];
Step 7 - For calculating score average, average_score = sum_score / (counter - 1);
Step 8 - Use if condition for giving output of below average and highest marks students. For
example - if(student_score[g] < average_score)
then
system.out.println("Student_score is : ", student_score[k]); // Similarly print of average score.

Weitere ähnliche Inhalte

Ähnlich wie Assume that the maximum number of students in a class is 50- Write a p.docx

Java căn bản - Chapter13
Java căn bản - Chapter13Java căn bản - Chapter13
Java căn bản - Chapter13Vince Vo
 
Chapter 13 - Inheritance and Polymorphism
Chapter 13 - Inheritance and PolymorphismChapter 13 - Inheritance and Polymorphism
Chapter 13 - Inheritance and PolymorphismEduardo Bergavera
 
9608 Computer Science Cambridge International AS level Pre-Release May June p...
9608 Computer Science Cambridge International AS level Pre-Release May June p...9608 Computer Science Cambridge International AS level Pre-Release May June p...
9608 Computer Science Cambridge International AS level Pre-Release May June p...Isham Rashik
 
Project 4 1/tutorialoutlet
Project 4 1/tutorialoutletProject 4 1/tutorialoutlet
Project 4 1/tutorialoutletMessanz
 
Course recommender system
Course recommender systemCourse recommender system
Course recommender systemAakash Chotrani
 

Ähnlich wie Assume that the maximum number of students in a class is 50- Write a p.docx (8)

Lab exam question_paper
Lab exam question_paperLab exam question_paper
Lab exam question_paper
 
Java căn bản - Chapter13
Java căn bản - Chapter13Java căn bản - Chapter13
Java căn bản - Chapter13
 
Chapter 13 - Inheritance and Polymorphism
Chapter 13 - Inheritance and PolymorphismChapter 13 - Inheritance and Polymorphism
Chapter 13 - Inheritance and Polymorphism
 
Analysis
AnalysisAnalysis
Analysis
 
C sharp chap5
C sharp chap5C sharp chap5
C sharp chap5
 
9608 Computer Science Cambridge International AS level Pre-Release May June p...
9608 Computer Science Cambridge International AS level Pre-Release May June p...9608 Computer Science Cambridge International AS level Pre-Release May June p...
9608 Computer Science Cambridge International AS level Pre-Release May June p...
 
Project 4 1/tutorialoutlet
Project 4 1/tutorialoutletProject 4 1/tutorialoutlet
Project 4 1/tutorialoutlet
 
Course recommender system
Course recommender systemCourse recommender system
Course recommender system
 

Mehr von bickerstaffinell

A- Imagine you were recently hired as a general manager working in a.docx
A-  Imagine you were recently hired as a general manager working in a.docxA-  Imagine you were recently hired as a general manager working in a.docx
A- Imagine you were recently hired as a general manager working in a.docxbickerstaffinell
 
a) Describe two ways the researcher could minimise experimenter bias i.docx
a) Describe two ways the researcher could minimise experimenter bias i.docxa) Describe two ways the researcher could minimise experimenter bias i.docx
a) Describe two ways the researcher could minimise experimenter bias i.docxbickerstaffinell
 
All organisations are affected to some extent by external factors and.docx
All organisations are affected to some extent by external factors and.docxAll organisations are affected to some extent by external factors and.docx
All organisations are affected to some extent by external factors and.docxbickerstaffinell
 
All the following are important uses of -ICD-11-- EXCEPT- Select one-.docx
All the following are important uses of -ICD-11-- EXCEPT- Select one-.docxAll the following are important uses of -ICD-11-- EXCEPT- Select one-.docx
All the following are important uses of -ICD-11-- EXCEPT- Select one-.docxbickerstaffinell
 
All of the following were discussed in lecture as ways teams create no.docx
All of the following were discussed in lecture as ways teams create no.docxAll of the following were discussed in lecture as ways teams create no.docx
All of the following were discussed in lecture as ways teams create no.docxbickerstaffinell
 
All of the following statements are true with respect to the bacteria.docx
All of the following statements are true with respect to the bacteria.docxAll of the following statements are true with respect to the bacteria.docx
All of the following statements are true with respect to the bacteria.docxbickerstaffinell
 
Airport Delays The problems created by increased security measures at.docx
Airport Delays The problems created by increased security measures at.docxAirport Delays The problems created by increased security measures at.docx
Airport Delays The problems created by increased security measures at.docxbickerstaffinell
 
Agency theory explains manager's behavior- Which one is false- The agm.docx
Agency theory explains manager's behavior- Which one is false- The agm.docxAgency theory explains manager's behavior- Which one is false- The agm.docx
Agency theory explains manager's behavior- Which one is false- The agm.docxbickerstaffinell
 
After studying our second case with ISIS- we should have a good unders.docx
After studying our second case with ISIS- we should have a good unders.docxAfter studying our second case with ISIS- we should have a good unders.docx
After studying our second case with ISIS- we should have a good unders.docxbickerstaffinell
 
After reading the article on Big Bottom Market make an analysis of the.docx
After reading the article on Big Bottom Market make an analysis of the.docxAfter reading the article on Big Bottom Market make an analysis of the.docx
After reading the article on Big Bottom Market make an analysis of the.docxbickerstaffinell
 
A vaccine against HIV Group of answer choices may be impossible due.docx
A vaccine against HIV    Group of answer choices may be impossible due.docxA vaccine against HIV    Group of answer choices may be impossible due.docx
A vaccine against HIV Group of answer choices may be impossible due.docxbickerstaffinell
 
Additional information for the Income Statement- 1 mterest expense of.docx
Additional information for the Income Statement- 1 mterest expense of.docxAdditional information for the Income Statement- 1 mterest expense of.docx
Additional information for the Income Statement- 1 mterest expense of.docxbickerstaffinell
 
Addison Ltd owns all of the share capital of Erin Ltd- In relation to.docx
Addison Ltd owns all of the share capital of Erin Ltd- In relation to.docxAddison Ltd owns all of the share capital of Erin Ltd- In relation to.docx
Addison Ltd owns all of the share capital of Erin Ltd- In relation to.docxbickerstaffinell
 
actually I need answers of all these questions as soon as possible ple.docx
actually I need answers of all these questions as soon as possible ple.docxactually I need answers of all these questions as soon as possible ple.docx
actually I need answers of all these questions as soon as possible ple.docxbickerstaffinell
 
accumulated depreciation A- is allocated as an expense during future p.docx
accumulated depreciation A- is allocated as an expense during future p.docxaccumulated depreciation A- is allocated as an expense during future p.docx
accumulated depreciation A- is allocated as an expense during future p.docxbickerstaffinell
 
Accounting and Economic profiss are computed differently and serve dif.docx
Accounting and Economic profiss are computed differently and serve dif.docxAccounting and Economic profiss are computed differently and serve dif.docx
Accounting and Economic profiss are computed differently and serve dif.docxbickerstaffinell
 
According to the Solow model- Suppose that an earthquake destroys most.docx
According to the Solow model- Suppose that an earthquake destroys most.docxAccording to the Solow model- Suppose that an earthquake destroys most.docx
According to the Solow model- Suppose that an earthquake destroys most.docxbickerstaffinell
 
According to Culturally-Endorsed Leadership Theory- cultures differ on.docx
According to Culturally-Endorsed Leadership Theory- cultures differ on.docxAccording to Culturally-Endorsed Leadership Theory- cultures differ on.docx
According to Culturally-Endorsed Leadership Theory- cultures differ on.docxbickerstaffinell
 
According to a study done by Nick Wilson of Otago University Wellingto.docx
According to a study done by Nick Wilson of Otago University Wellingto.docxAccording to a study done by Nick Wilson of Otago University Wellingto.docx
According to a study done by Nick Wilson of Otago University Wellingto.docxbickerstaffinell
 
A-) What is the difference between encrypting and signing in asymmetri.docx
A-) What is the difference between encrypting and signing in asymmetri.docxA-) What is the difference between encrypting and signing in asymmetri.docx
A-) What is the difference between encrypting and signing in asymmetri.docxbickerstaffinell
 

Mehr von bickerstaffinell (20)

A- Imagine you were recently hired as a general manager working in a.docx
A-  Imagine you were recently hired as a general manager working in a.docxA-  Imagine you were recently hired as a general manager working in a.docx
A- Imagine you were recently hired as a general manager working in a.docx
 
a) Describe two ways the researcher could minimise experimenter bias i.docx
a) Describe two ways the researcher could minimise experimenter bias i.docxa) Describe two ways the researcher could minimise experimenter bias i.docx
a) Describe two ways the researcher could minimise experimenter bias i.docx
 
All organisations are affected to some extent by external factors and.docx
All organisations are affected to some extent by external factors and.docxAll organisations are affected to some extent by external factors and.docx
All organisations are affected to some extent by external factors and.docx
 
All the following are important uses of -ICD-11-- EXCEPT- Select one-.docx
All the following are important uses of -ICD-11-- EXCEPT- Select one-.docxAll the following are important uses of -ICD-11-- EXCEPT- Select one-.docx
All the following are important uses of -ICD-11-- EXCEPT- Select one-.docx
 
All of the following were discussed in lecture as ways teams create no.docx
All of the following were discussed in lecture as ways teams create no.docxAll of the following were discussed in lecture as ways teams create no.docx
All of the following were discussed in lecture as ways teams create no.docx
 
All of the following statements are true with respect to the bacteria.docx
All of the following statements are true with respect to the bacteria.docxAll of the following statements are true with respect to the bacteria.docx
All of the following statements are true with respect to the bacteria.docx
 
Airport Delays The problems created by increased security measures at.docx
Airport Delays The problems created by increased security measures at.docxAirport Delays The problems created by increased security measures at.docx
Airport Delays The problems created by increased security measures at.docx
 
Agency theory explains manager's behavior- Which one is false- The agm.docx
Agency theory explains manager's behavior- Which one is false- The agm.docxAgency theory explains manager's behavior- Which one is false- The agm.docx
Agency theory explains manager's behavior- Which one is false- The agm.docx
 
After studying our second case with ISIS- we should have a good unders.docx
After studying our second case with ISIS- we should have a good unders.docxAfter studying our second case with ISIS- we should have a good unders.docx
After studying our second case with ISIS- we should have a good unders.docx
 
After reading the article on Big Bottom Market make an analysis of the.docx
After reading the article on Big Bottom Market make an analysis of the.docxAfter reading the article on Big Bottom Market make an analysis of the.docx
After reading the article on Big Bottom Market make an analysis of the.docx
 
A vaccine against HIV Group of answer choices may be impossible due.docx
A vaccine against HIV    Group of answer choices may be impossible due.docxA vaccine against HIV    Group of answer choices may be impossible due.docx
A vaccine against HIV Group of answer choices may be impossible due.docx
 
Additional information for the Income Statement- 1 mterest expense of.docx
Additional information for the Income Statement- 1 mterest expense of.docxAdditional information for the Income Statement- 1 mterest expense of.docx
Additional information for the Income Statement- 1 mterest expense of.docx
 
Addison Ltd owns all of the share capital of Erin Ltd- In relation to.docx
Addison Ltd owns all of the share capital of Erin Ltd- In relation to.docxAddison Ltd owns all of the share capital of Erin Ltd- In relation to.docx
Addison Ltd owns all of the share capital of Erin Ltd- In relation to.docx
 
actually I need answers of all these questions as soon as possible ple.docx
actually I need answers of all these questions as soon as possible ple.docxactually I need answers of all these questions as soon as possible ple.docx
actually I need answers of all these questions as soon as possible ple.docx
 
accumulated depreciation A- is allocated as an expense during future p.docx
accumulated depreciation A- is allocated as an expense during future p.docxaccumulated depreciation A- is allocated as an expense during future p.docx
accumulated depreciation A- is allocated as an expense during future p.docx
 
Accounting and Economic profiss are computed differently and serve dif.docx
Accounting and Economic profiss are computed differently and serve dif.docxAccounting and Economic profiss are computed differently and serve dif.docx
Accounting and Economic profiss are computed differently and serve dif.docx
 
According to the Solow model- Suppose that an earthquake destroys most.docx
According to the Solow model- Suppose that an earthquake destroys most.docxAccording to the Solow model- Suppose that an earthquake destroys most.docx
According to the Solow model- Suppose that an earthquake destroys most.docx
 
According to Culturally-Endorsed Leadership Theory- cultures differ on.docx
According to Culturally-Endorsed Leadership Theory- cultures differ on.docxAccording to Culturally-Endorsed Leadership Theory- cultures differ on.docx
According to Culturally-Endorsed Leadership Theory- cultures differ on.docx
 
According to a study done by Nick Wilson of Otago University Wellingto.docx
According to a study done by Nick Wilson of Otago University Wellingto.docxAccording to a study done by Nick Wilson of Otago University Wellingto.docx
According to a study done by Nick Wilson of Otago University Wellingto.docx
 
A-) What is the difference between encrypting and signing in asymmetri.docx
A-) What is the difference between encrypting and signing in asymmetri.docxA-) What is the difference between encrypting and signing in asymmetri.docx
A-) What is the difference between encrypting and signing in asymmetri.docx
 

Kürzlich hochgeladen

Concurrency Control in Database Management system
Concurrency Control in Database Management systemConcurrency Control in Database Management system
Concurrency Control in Database Management systemChristalin Nelson
 
Transaction Management in Database Management System
Transaction Management in Database Management SystemTransaction Management in Database Management System
Transaction Management in Database Management SystemChristalin Nelson
 
ARTERIAL BLOOD GAS ANALYSIS........pptx
ARTERIAL BLOOD  GAS ANALYSIS........pptxARTERIAL BLOOD  GAS ANALYSIS........pptx
ARTERIAL BLOOD GAS ANALYSIS........pptxAneriPatwari
 
MS4 level being good citizen -imperative- (1) (1).pdf
MS4 level   being good citizen -imperative- (1) (1).pdfMS4 level   being good citizen -imperative- (1) (1).pdf
MS4 level being good citizen -imperative- (1) (1).pdfMr Bounab Samir
 
Scientific Writing :Research Discourse
Scientific  Writing :Research  DiscourseScientific  Writing :Research  Discourse
Scientific Writing :Research DiscourseAnita GoswamiGiri
 
ICS 2208 Lecture Slide Notes for Topic 6
ICS 2208 Lecture Slide Notes for Topic 6ICS 2208 Lecture Slide Notes for Topic 6
ICS 2208 Lecture Slide Notes for Topic 6Vanessa Camilleri
 
ClimART Action | eTwinning Project
ClimART Action    |    eTwinning ProjectClimART Action    |    eTwinning Project
ClimART Action | eTwinning Projectjordimapav
 
DIFFERENT BASKETRY IN THE PHILIPPINES PPT.pptx
DIFFERENT BASKETRY IN THE PHILIPPINES PPT.pptxDIFFERENT BASKETRY IN THE PHILIPPINES PPT.pptx
DIFFERENT BASKETRY IN THE PHILIPPINES PPT.pptxMichelleTuguinay1
 
Beauty Amidst the Bytes_ Unearthing Unexpected Advantages of the Digital Wast...
Beauty Amidst the Bytes_ Unearthing Unexpected Advantages of the Digital Wast...Beauty Amidst the Bytes_ Unearthing Unexpected Advantages of the Digital Wast...
Beauty Amidst the Bytes_ Unearthing Unexpected Advantages of the Digital Wast...DhatriParmar
 
Congestive Cardiac Failure..presentation
Congestive Cardiac Failure..presentationCongestive Cardiac Failure..presentation
Congestive Cardiac Failure..presentationdeepaannamalai16
 
4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptx4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptxmary850239
 
CHEST Proprioceptive neuromuscular facilitation.pptx
CHEST Proprioceptive neuromuscular facilitation.pptxCHEST Proprioceptive neuromuscular facilitation.pptx
CHEST Proprioceptive neuromuscular facilitation.pptxAneriPatwari
 
Narcotic and Non Narcotic Analgesic..pdf
Narcotic and Non Narcotic Analgesic..pdfNarcotic and Non Narcotic Analgesic..pdf
Narcotic and Non Narcotic Analgesic..pdfPrerana Jadhav
 
Mythology Quiz-4th April 2024, Quiz Club NITW
Mythology Quiz-4th April 2024, Quiz Club NITWMythology Quiz-4th April 2024, Quiz Club NITW
Mythology Quiz-4th April 2024, Quiz Club NITWQuiz Club NITW
 
Using Grammatical Signals Suitable to Patterns of Idea Development
Using Grammatical Signals Suitable to Patterns of Idea DevelopmentUsing Grammatical Signals Suitable to Patterns of Idea Development
Using Grammatical Signals Suitable to Patterns of Idea Developmentchesterberbo7
 
Expanded definition: technical and operational
Expanded definition: technical and operationalExpanded definition: technical and operational
Expanded definition: technical and operationalssuser3e220a
 
Grade Three -ELLNA-REVIEWER-ENGLISH.pptx
Grade Three -ELLNA-REVIEWER-ENGLISH.pptxGrade Three -ELLNA-REVIEWER-ENGLISH.pptx
Grade Three -ELLNA-REVIEWER-ENGLISH.pptxkarenfajardo43
 
4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptx4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptxmary850239
 

Kürzlich hochgeladen (20)

Concurrency Control in Database Management system
Concurrency Control in Database Management systemConcurrency Control in Database Management system
Concurrency Control in Database Management system
 
Transaction Management in Database Management System
Transaction Management in Database Management SystemTransaction Management in Database Management System
Transaction Management in Database Management System
 
ARTERIAL BLOOD GAS ANALYSIS........pptx
ARTERIAL BLOOD  GAS ANALYSIS........pptxARTERIAL BLOOD  GAS ANALYSIS........pptx
ARTERIAL BLOOD GAS ANALYSIS........pptx
 
MS4 level being good citizen -imperative- (1) (1).pdf
MS4 level   being good citizen -imperative- (1) (1).pdfMS4 level   being good citizen -imperative- (1) (1).pdf
MS4 level being good citizen -imperative- (1) (1).pdf
 
Scientific Writing :Research Discourse
Scientific  Writing :Research  DiscourseScientific  Writing :Research  Discourse
Scientific Writing :Research Discourse
 
ICS 2208 Lecture Slide Notes for Topic 6
ICS 2208 Lecture Slide Notes for Topic 6ICS 2208 Lecture Slide Notes for Topic 6
ICS 2208 Lecture Slide Notes for Topic 6
 
ClimART Action | eTwinning Project
ClimART Action    |    eTwinning ProjectClimART Action    |    eTwinning Project
ClimART Action | eTwinning Project
 
DIFFERENT BASKETRY IN THE PHILIPPINES PPT.pptx
DIFFERENT BASKETRY IN THE PHILIPPINES PPT.pptxDIFFERENT BASKETRY IN THE PHILIPPINES PPT.pptx
DIFFERENT BASKETRY IN THE PHILIPPINES PPT.pptx
 
Paradigm shift in nursing research by RS MEHTA
Paradigm shift in nursing research by RS MEHTAParadigm shift in nursing research by RS MEHTA
Paradigm shift in nursing research by RS MEHTA
 
Beauty Amidst the Bytes_ Unearthing Unexpected Advantages of the Digital Wast...
Beauty Amidst the Bytes_ Unearthing Unexpected Advantages of the Digital Wast...Beauty Amidst the Bytes_ Unearthing Unexpected Advantages of the Digital Wast...
Beauty Amidst the Bytes_ Unearthing Unexpected Advantages of the Digital Wast...
 
Congestive Cardiac Failure..presentation
Congestive Cardiac Failure..presentationCongestive Cardiac Failure..presentation
Congestive Cardiac Failure..presentation
 
4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptx4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptx
 
CHEST Proprioceptive neuromuscular facilitation.pptx
CHEST Proprioceptive neuromuscular facilitation.pptxCHEST Proprioceptive neuromuscular facilitation.pptx
CHEST Proprioceptive neuromuscular facilitation.pptx
 
Narcotic and Non Narcotic Analgesic..pdf
Narcotic and Non Narcotic Analgesic..pdfNarcotic and Non Narcotic Analgesic..pdf
Narcotic and Non Narcotic Analgesic..pdf
 
Mythology Quiz-4th April 2024, Quiz Club NITW
Mythology Quiz-4th April 2024, Quiz Club NITWMythology Quiz-4th April 2024, Quiz Club NITW
Mythology Quiz-4th April 2024, Quiz Club NITW
 
Faculty Profile prashantha K EEE dept Sri Sairam college of Engineering
Faculty Profile prashantha K EEE dept Sri Sairam college of EngineeringFaculty Profile prashantha K EEE dept Sri Sairam college of Engineering
Faculty Profile prashantha K EEE dept Sri Sairam college of Engineering
 
Using Grammatical Signals Suitable to Patterns of Idea Development
Using Grammatical Signals Suitable to Patterns of Idea DevelopmentUsing Grammatical Signals Suitable to Patterns of Idea Development
Using Grammatical Signals Suitable to Patterns of Idea Development
 
Expanded definition: technical and operational
Expanded definition: technical and operationalExpanded definition: technical and operational
Expanded definition: technical and operational
 
Grade Three -ELLNA-REVIEWER-ENGLISH.pptx
Grade Three -ELLNA-REVIEWER-ENGLISH.pptxGrade Three -ELLNA-REVIEWER-ENGLISH.pptx
Grade Three -ELLNA-REVIEWER-ENGLISH.pptx
 
4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptx4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptx
 

Assume that the maximum number of students in a class is 50- Write a p.docx

  • 1. Assume that the maximum number of students in a class is 50. Write a program that reads students' names followed by their test scores from a file and outputs the following: a. Class average. b. Names of all the students whose test scores are below the class average, with an appropriate message. c. Highest test score and the names of all of the students having the highest score. Sample given from text file: Johnson 76 Miller 90 Duffy 95 Robinson 45 Ashtony 63 Goofy 89 Pluto 95 Mickey 72 Billy 76 Danny 56 Balto 95 Roony 87 Doc 67 Minne 95 Duckey 72 Andy 76
  • 2. Solution Solution : For coding the program of students, just follow the various steps - Step 1 - Create a class student_score which calculates the students score. For example - public class student_score Step 2 - Create a main method function in which define a array of double size for storing students score and create a object of name and initialize the variables and integers. For example - double [] score = new double[50]; string [] name = new string[50]; int i,j; Step 3 - Take input from user using scanner. For example - scanner read_name = new scanner(sys.in); // similarly read score and other data of student. Step 4 - Use do for storing and reading of student name and score. For example - do { i++; counter++; // display the student_name and student_score } Step 5 - Set initial value of score to array element and then compare one by one. Step 6 - For calculating highest score sum all of the score. For example - sum_score = sum_score + student_score[g]; Step 7 - For calculating score average, average_score = sum_score / (counter - 1);
  • 3. Step 8 - Use if condition for giving output of below average and highest marks students. For example - if(student_score[g] < average_score) then system.out.println("Student_score is : ", student_score[k]); // Similarly print of average score.