تم الحل ✓
categoryبرمجة وتطوير البرمجيات
schoolبكالوريوس
event_available2026-07-14
السؤال
Transcribed Image Text:
Write a class Date. The Date has a day (type is int), month (type is int), year (type is int), and time (type
is int).
Write a class Meeting. The Meeting has a date (type is Date), place (type is String), and topic (type is
String). The Meeting class has a static member: numberOfMeetings to keep track of the number of
meetings created.
1. Draw the UML diagram of your classes.
2. Add accessors and mutators to your classes.
3. Add a default constructor, an initialization constructor, and a copy constructor to your classes.
4. Add a toString() method to each class.
5. Every time a meeting object is created, the number of meetings is incremented (use a static
method to increment the static data member numberOfMeetings).
6. Add a test class to
a. Create three meeting (say m1, m2 and m3) for a specific date in a specific place, and with a
specific topic. Take your input from the user using s Scanner.
b. Create another meeting m4, which is a shallow copy of m1.
c. Create another meeting m5, which is a deep copy of m1.
d. Display all created meetings.
e. Display the number of meetings created.
f. Change the date of one of the meetings (say m1).
g. Change the place of another meeting (say m2).
h. Change the topic of the third meeting (say m3).
i. Display all the meetings again.
j. Save all your meetings to an output file. Call it "meetingdata.txt".
check_circle الجواب — حل مفصل خطوة بخطوة
hourglass_top
🔒
الحل الكامل متاح للمشتركين
اشترك في أرشيف الأسئلة لعرض هذا الحل وآلاف الحلول المفصلة خطوة بخطوة من معلمين معتمدين.