السلام عليكم
انا اول مررة اشارك في هذا المنتدى ارجو منكم ولمن يعرف الجافا يعطيني حل لهذا السؤال ضروري عندي اختبار واريد معرفة حلة وباسرع وقت
A. Define a student class that has the following members:
Variables:
Firstname Middlename Lastname
score on test 1 score on test 2.
Method:
Define Methods that read names and grades, print the initial names, the length, compute the average, and print student's information.
- Constructor with no parameters, that gives initial value for each variable (Fname = “ “ , Mname = “ “,Lname = “ “ , test1 =0 , test2 = 0).
- inputname : read student’s name .
- inputGrades: read student's grades for test1 and test2. e.g., " Enter Joe's score for test1") .
- Initial: return the initial string ( EX: A. M. F.)
- get_length: return the length of the 3 names in total.
- getAverage: compute and return the student's test average.
- getName: returns the student's name .
- toString: returns a String representing the name object (in capital form) and the scores.
B. At the main methods do the following:
- Define two student’s object and read their information using the above methods (Inputname InputGrades).
- Print the length of the second object ( as a full name)
- Print the initial of the second object.
- Calculate the tests' average for the first student.
- Print the students’ information for both students.
ارجوكم بيضو وجهي واعطوني الحل باسرع وقت والله لادعيلة بصلاتي