Home > Back-end > Don't know where there is a problem.. A freshman quickly collapsed
Don't know where there is a problem.. A freshman quickly collapsed
Time:10-02
Homework is to make the written in the Java subjects and 100 students randomly generated a total score of form but the outcome of the goose is the worst mistake is also don't know what wrong Really good hard top online class??
Package Javafromthescatching; Import the Java. Util. ArrayList; Import the Java. Util. Random;
Public class Javafromthescatching {static ArrayList Records=new ArrayList (); Public static void main (String arg []) {int number=0, k=0, m=0, e=0, s=0; Int total; for(int i=0; I<100; I++) {number=I + 1; K=new Random (). NextInt (100) + 1; M=new Random (). NextInt (100) + 1; E=new Random (). NextInt (100) + 1; S=new Random (). NextInt (100) + 1; Total=k + m + e + s; Record record1=new Record (number, k, m, e, s); Record1. Sum=total; Records. The add (record1); } System. Out. Println (" ID Number/Korean Math English Science Sum \ t "); for(int i=0; I<100; I++) {Record record2=records. The get (I); Number=record2. GetIdNumber (); K=record2. Korean; M=record2. Math; E=record2. English; S=record2. Science; Total=record2. Sum; System. Out. Println (" "+ number +" \ t \ \ t t + k + "t \ \ t + m +" \ t "\ t" + e + "t \ \ t + s +" \ t "\ t" + total + "\ t"); }} }
CodePudding user response:
Can't find the Record this class, guide packages or create inner class and class names don't pick up the Object and core JDK class libraries