Question: Consider the following java program ` ` ` package exams; public oless Exambetails & public atatie void main ( StEing [ ] arga ) (
Consider the following java program
package exams;
public oless Exambetails &
public atatie void mainStEing arga
StudentReaulea astudent nev StudentRearLta ;
String sName astudent.fullNaneBadre Soularni" s
$tring exean astuclent,exanName V ;
String acore aSeudent.exanScore :
String grade ascudent. examxade :
Syatens. O&tprint in sNome ;
Syarem. obt.printin exam ;
System. obl.printin scoke :
Syscew. out printin grade y
packnge exarar:
prbize olass stodentBesults t
pciwase acxioy FallFoses
privare Sering EramKnese;
pulwate acring Enasseoke.
prsvase Atring EraxGrader
Stwelemthesults
rallKenen "Tho Mone Gsven";
EnasNuse "Uaknova":
Eraspore Ho core";
ErazGrade "Trkmova":
I
FuliMane altase?
return FuitFocet;
Bting exandiane ing exanCode
erancods EganlavD
EnanNase "Tliswol Basto MeT"y
elae if exncaCodeequalaN &
ZxanMane wva":
gamma
ExHsBHne CF SOLT'
I
else it lexunCodeequassPRi
EraxNuse "rap";
else
TxnnMlun Ks Zxus Aelectad";
return ExanMane
String examScare int aseogef
Erangeoce asooce out of
retura ExonFcore;
trimmanskadgint asoocel
EranenSi this. getGrnde sGleore;
retura ExasGcada:
privare String etirade int afoore
tring exnanGEade ;
if nScore atcore
exaenGrade F I
else it aScore ascore
extenGrade ;
elae it aScore aScore
exnanGrade C ;
else it aScore $ abcore
exnagrade B;
else it aScore
exnanGrade A;
retura "Graste in exanGrade;
a What is the output of the program.
b What is the need of the method examGrade
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
