Write a program that takes as input from the user his/her details (i.e. name, age and gender) and displays the average age of all the people entered.
Hint:
Person class with the following components:
Instance variables name, age, gender.
Instance methods setName, getName, and getAge.
Class method getAverageAge.
السلام عليكم ..
انا دوبي بدرس كورس الجافا والدكتوره اعطتنا هالسؤال هوم وورك
صرآحه انا فهمت السؤال بس مو عآرفه كيف اكتب الصيغه
كود:
public class person {
private int age ;
private char name ;
private char gender ;
void setName ();
char getName ();
int getAge ();
int getAverageAge ();
تقريبن هذا الكود اللي قدرت اسويه .. هوا استخدم فيه array بس مني عارفه كيف اكتب صيغته وفين احطه بالضبط
والبرنامج اللي بستخدمه هو JCreator
يالييييييت لو تكرمتوا تساااعدوني بااقرب وقت لانه تسليمه بعد بكره يوم الاحد ..
بجد حايسه في الماده هذه وربي يجزاكم الجنه يااارب ..