تم الحل ✓
categoryبرمجة وتطوير البرمجيات
schoolبكالوريوس
event_available2026-07-15
السؤال
Transcribed Image Text:
Create a java program for Student profile with the following requirements.
a) Each Student has: two variables id, and name.
b) A Student can be initialization with two constructers:
Constructer without parameters, that set the id to zero and
the name to an empty string.
• Constructer with tow parameters to initialize the variables id
and name by a specific value.
c) Add a set method for each variable that change them to a specific
value.
d) Add a get method for each variable which return its value.
To test the program, create a class Student Test with the main method.
In the main method:
a) Create two empty Student profiles $1 and S2.
b) Print the $1 and $2 information.
c) Create a new student profile $3, specify the student id and name.
d) Change S3 id and name.
e) Print the id and name of $3.
check_circle الجواب — حل مفصل خطوة بخطوة
hourglass_top
🔒
الحل الكامل متاح للمشتركين
اشترك في أرشيف الأسئلة لعرض هذا الحل وآلاف الحلول المفصلة خطوة بخطوة من معلمين معتمدين.