01-10-19, 04:44 AM
السلام عليكم لو ممكن تساعدوني في حل هذا السؤال اكون شاكرة جدا
A student is caracterized by first name (String), family name (String), id (int) and pass word
(String). A student can perform the following operations:
He can get (obtain) and set (modify) his id.
- He can get (obtain) and set (modify) his pass word. To modify his pass word, he
must give the old pass word to check if it is his account. If it is Ok, the pass word
will be changed. If not, a message displayed to inform him that it is impossible to
change the pass word.
1. Based on the description above, write a java class Student.java to model a student.
2. Write a method main to create one student called s1 with first name = Ahmed,
family name = Salah, id = 12058410, and pass word = Azerty.
3. Change his id as 12058320. Don't forget to use set method for id.
4.
5. Display all information of the student (You can access the attribute by
Change his pass word as Querty. Don't forget to use set method for pass word.
s1.attribute name).
A student is caracterized by first name (String), family name (String), id (int) and pass word
(String). A student can perform the following operations:
He can get (obtain) and set (modify) his id.
- He can get (obtain) and set (modify) his pass word. To modify his pass word, he
must give the old pass word to check if it is his account. If it is Ok, the pass word
will be changed. If not, a message displayed to inform him that it is impossible to
change the pass word.
1. Based on the description above, write a java class Student.java to model a student.
2. Write a method main to create one student called s1 with first name = Ahmed,
family name = Salah, id = 12058410, and pass word = Azerty.
3. Change his id as 12058320. Don't forget to use set method for id.
4.
5. Display all information of the student (You can access the attribute by
Change his pass word as Querty. Don't forget to use set method for pass word.
s1.attribute name).