Home > Back-end >  To a great god for Java programs
To a great god for Java programs

Time:09-18

For Java program
Design a Student that contains one of the students in the class of the basic data are as follows:
Number, name, gender, age, math, computer, foreign language achievement,
The Numbers for positive integer, and from no. 1 continuous back coding; Name as a string, sex to characters and w (m), after the combination of specific data is as follows:
1 LiPing 18, 89, 98, 94 m
Create a text file, the file named a.t xt, according to the above format in the text file into eight rows of data, using data from a text file for initialized objects of eight students,

Members of the Student class contains the following methods
(1) design method for the student class object is initialized,
(2) a student's grade and the grade point average, according to the results on the screen,
(3) to determine whether these students are excellent, excellent condition is that the only branch of no less than 85 points, the average score of no less than 90 points,
(4), the information of the eight students in accordance with the average score from high to low arrangement, will the results from high to low is stored in a text file b.t xt,
Design a master class TestStudent classes are used to detect Student class,
Message:
1 file a.t xt can be directly set up, one of the eight lines set, but must be in accordance with the requirements of the format and conform to the specified data type and size,
2 design after complete the Student class in TestStudent Student to set up a Student class in the class of array [] st=new Student [8]. .
3 open a.t xt file, read a line, with the string handling functions, will be cut in this string, subjects must be converted to the corresponding value type, with the eight groups of data for st to initialize an array, which is for the Student object is initialized,

CodePudding user response:

This code should be pretty much of their online could use a change
  • Related