Home > Back-end >  Java program to modify
Java program to modify

Time:09-30

, ladies and gentlemen, how to improve the program, enter only branch of Chinese maths English result, the output of Chinese maths English only branch grade and calculate the total grade!
Package demo;
Public class Text {
Private String sno.
Private int Chinese;
Private int math;
Private int English;
Public Text (String sno) {
This. Sno=sno;
}
Public Text (String sno, int Chinese, int math, int English)
{
This. Sno=sno;
This. Chinese=Chinese;
This. Math=math;
This. English=English;
}
Public void show ()
{
System. The out. Printf (" Chinese sno: % s: % d math: English: % d % d % n ", sno, Chinese, math, English).
}
Public static void main (String [] args) {

}

}
  • Related