![]() |
|
#1
|
|||
|
|||
Please Help Me To Build My Calendar!!!HELLO EVERYBODY...
I REALLY NEED YOUR HELP!!!! I DON'T KNOW HOW TO BUILD A CALENDAR.... FOR ME, IT VERY COMPLEXS.. PLEASE HELP ME.. YOU CAN SEND THE SOLUTION TO MY EMAIL. suriani_851204@yahoo.com.my Object-Oriented Programming MyCal: A Simple Calendar Application For this project, you are required to build a Java application called MyCal. MyCal is a simple calendar application that has the following features: 1. Create an empty calendar A user must create an empty calendar for a particular year before any appointment can be made for that year. For example, to store appointments for the year 2006, the user will first need to request MyCal to create an empty calendar for 2006. Output O1 shows the opening screen for MyCal. In this screen, the user is asked whether to create a new (empty) calendar or to open an existing one. Output O2 shows the screen displayed when the user chooses to create a new calendar. 2. Display the current calendar MyCal is able to display all dates for each month in the current calendar. There are three basic views through which a user may view the calendar: a. Year View This view displays the total number of appointments for each month in the current calendar. Refer output O3. b. Month View This view displays the total number of appointments for a particular month in the current calendar. Refer output O5. c. Day View This view displays a list of appointments for a particular day and month in the current calendar. Refer output O6. 3. Add/Delete appointments A MyCal user can add an appointment in either the Year View or the Day View (refer outputs O4 and O7). Appointments can only be deleted in the Day View (refer output O 4. Check appointment clashes When making a new appointment, MyCal will check if there any time clashes between that appointment and existing appointments. If a time clash occurs, MyCal will display a warning and asks the user for confirmation (refer output O9). 5. Save calendar MyCal will automatically save the current calendar when the user exits the program (refer output O10). 6. Open an existing calendar A user can choose to open a previously saved calendar in MyCal‘s opening screen (refer output O11). Design Based on the description given above, you are required to construct MyCal using object-oriented programming and the Java language. You will be provided with a skeletal Java program next week which you must use as a basis for constructing your program. Further instructions will also be given in that week. Implementation The user interface for your program must be text-based. Thus, you are not allowed to use any GUI (Graphical User Interface) components such as those provided in the AWT and Swing libraries. The outputs in the appendix are only suggestions. Your program need not follow the format exactly as long as it is consistent with the description given above. Deadline The deadline for submitting your project is on 11 SEPTEMBER 2006. Late submissions will be strictly rejected (we really mean it!). APPENDIX: SAMPLE OUTPUT • O1: MyCal’s Opening Screen W E L C O M E T O M y C a l ======================= <<What do you want to do?>> [1]. Create a new calendar [2]. Open a calendar [0]. Exit MyCal Selection: • O2: Creating a New Calendar W E L C O M E T O M y C a l ======================= <<What do you want to do?>> [1]. Create a new calendar [2]. Open a calendar [0]. Exit MyCal Selection: 1 Enter year: 2006 Calendar 2006 created • O3: Year View ============= Calendar 2006 ============= 1. JAN (0) 2. FEB (0) 3. MAC (0) 4. APR (0) 5. MAY (0) 6. JUN (0) 7. JUL (0) 8. AUG (0) 9. SEP (0) 10. OCT (0 11. NOV (0) 12. DEC (0) <<What do you want to do?>> [1 - 12]. Choose a month [13]. Add an appointment [0]. Exit MyCal Selection: • O4: Adding a New Appointment in Year View ============= Calendar 2006 ============= 1. JAN (0) 2. FEB (0) 3. MAC (0) 4. APR (0) 5. MAY (0) 6. JUN (0) 7. JUL (0) 8. AUG (0) 9. SEP (0) 10. OCT (0 11. NOV (0) 12. DEC (0) <<What do you want to do?>> [1 - 12]. Choose a month [13]. Add an appointment [0]. Exit MyCal Selection: 13 Enter month: 2 Enter day: 3 Enter hr: 13 Enter mins: 30 Enter description: TK2933 Lecture • O5: Month View ============= FEB 2006 ============= 1. (0) 2. (0) 3. (1) 4. (0) 5. (0) 6. (0) 7. (0) 8. (0) 9. (0) 10. (0) 11. (0) 12. (0) 13. (0) 14. (0) 15. (0) 16. (0) 17. (0) 18. (0) 19. (0) 20. (0) 21. (0) 22. (0) 23. (0) 24. (0) 25. (0) 26. (0) 27. (0) 28. (0) <<What do you want to do?>> [1 - 31]. Choose a day [0]. Exit Selection: • O6: Day View ============= 3 FEB 2006 ============= 0. 13:30 TK2933 Lecture <<What do you want to do?>> [1]. Make a new appointment [2]. Delete an appointment [0]. Exit Selection: • O7: Adding a New Appointment in Day View ============= 3 FEB 2006 ============= 0. 13:30 TK2933 Lecture <<What do you want to do?>> [1]. Make a new appointment [2]. Delete an appointment [0]. Exit Selection: 1 Enter hour: 15 Enter min: 00 Enter description: Go to library • O8: Deleting an Appointment in Day View ============= 3 FEB 2006 ============= 0. 13:30 TK2933 Lecture 1. 15:00 Go to library <<What do you want to do?>> [1]. Make a new appointment [2]. Delete an appointment [0]. Exit Selection: 2 ============= 3 FEB 2006 ============= 0. 13:30 TK2933 Lecture 1. 15:00 Go to library Select appointment to delete: 0 ============= 3 FEB 2006 ============= 0. 15:00 Go to library <<What do you want to do?>> [1]. Make a new appointment [2]. Delete an appointment [0]. Exit Selection: • O9: Time Clash ============= 3 FEB 2006 ============= 0. 15:00 Go to library <<What do you want to do?>> [1]. Make a new appointment [2]. Delete an appointment [0]. Exit Selection: 1 Enter hour: 15 Enter min: 00 Enter description: Call Hassan TIME CLASH WARNING: Go to library Confirm (y/n)? y ============= 3 FEB 2006 ============= 0. 15:00 Go to library 1. 15:00 Call Hassan <<What do you want to do?>> [1]. Make a new appointment [2]. Delete an appointment [0]. Exit Selection: • O10: Automatic Saving ============= Calendar 2006 ============= 1. JAN (3) 2. FEB (4) 3. MAC (1) 4. APR (0) 5. MAY (0) 6. JUN (0) 7. JUL (0) 8. AUG (0) 9. SEP (0) 10. OCT (0 11. NOV (0) 12. DEC (0) <<What do you want to do?>> [1 - 12]. Choose a month [13]. Add an appointment [0]. Exit MyCal Selection:0 Saving the current calendar… Thank you for using MyCal! • O11: Opening a Calendar W E L C O M E T O M y C a l ======================= <<What do you want to do?>> [1]. Create a new calendar [2]. Open a calendar [0]. Exit MyCal Selection: 2 Enter year: 2006 Calendar 2006 successfully opened. ============= Calendar 2006 ============= 1. JAN (3) 2. FEB (4) 3. MAC (1) 4. APR (0) 5. MAY (0) 6. JUN (0) 7. JUL (0) 8. AUG (0) 9. SEP (0) 10. OCT (0 11. NOV (0) 12. DEC (0) <<What do you want to do?>> [1 - 12]. Choose a month [13]. Add an appointment [0]. Exit MyCal Selection: THIS IS THE DESIGN REQUIREMENT : TK2933 Object-Oriented Programming Group Project Project 1 Design Requirements Required Classes Your program must involve the following classes: i. MyCal class A MyCal object represents the calendar application. The main() method must be defined in the MyCal class.. The object performs the necessary initialization when the application starts its execution. It is responsible for displaying the opening menu through which the user specifies whether to create a new calendar or open an existing one. When the user has specified the calendar to work on, the object passes control to a YearViewer object. ii. YearViewer class A YearViewer object represents the “year view”. It is responsible for displaying the number of appointments for each month of the calendar. It displays the “year view” menu through which the user may request to add a new appointment or enter the “month view” for a particular month. If the user wishes to enter the “month view” for a particular month, the object passes control to a MonthViewer object. iii. MonthViewer class A MonthViewer object represents the “month view” for a particular month. It is responsible for displaying a summary of the number of appointments for each day of the month. It displays the “month view” menu through which the user may request to enter the “day view” for a particular day of the month. To enter the “day view”, the object needs to pass control to a DayViewer object. iv. DayViewer class A DayViewer object represents the “day view” for a particular day of a particular month. It is responsible for displaying a list of appointments for that day. It displays the “day view” menu through which the user may request to add a new appointment or delete an existing appointment for the day. v. Calendar class A Calendar object represents a calendar for a particular year. It manages a collection of Month objects; a Month object for each month of the year. vi. Month class A Month object represents a particular month. This object manages a collection of Day objects; a Day object for each day of the month. vii. Day class A Day object represents a particular day. This object manages a collection of Appointment objects; an Appointment object for each appoinment for the day. viii. Appointment class An Appointment object represents an appointment. This object contains information about the appointment. CalendarReader and CalendarWriter You will be provided with the CalendarReader and CalendarWriter classes to enable you to save and open calendars. i. CalendarReader This class has a method called read() for reading a calendar from a file: public Calendar read(String fname); where fname is the name of the file from which a calendar will be read. The method returns a Calendar object representing that calendar. The following example reads a calendar from a file named “2006”: Calendar cal = (new CalendarReader()).read("2006"); ii. CalendarWriter This class has a method called save() for saving a calendar to a file: public void save(String fname, Calendar cal); where cal refers to the Calendar object to be saved and fname is the name of the file. The following example saves a calendar to a file named “2006”: (new CalendarWriter()).write("2006", cal); Skeletal Program The skeletal program which will become the basis for your program is provided below (and can be downloaded from the portal). You will need to flesh out the class definitions (by defining the appropriate attributes and methods) so that the program runs as expected. You are not allowed to change the structure of the program although you may define additional classes and methods. Stages of Development You are encouraged to develop your program in stages as suggested below. Your program should be tested thoroughly at each stage before moving on to the following stage. Stage 1: • Able to correctly display an empty calendar in “year view”, “month view” and “day view” Stage 2: • Achieved Stage 0 • Able to add appointments in “day view” Stage 3: • Achieved Stage 2 • Able to delete appointments in “day view” Stage 4: • Achieved Stage 3 • Able to save calendar Stage 5: • Achieved Stage 4 • Able to open an existing calendar Stage 6: • Achieved Stage 5 • Able to add appointments in “year view” Stage 7: • Achieved Stage 6 • Able to check appointment clashes The Skeletal Program CPP / C++ / C Code:
Last edited by LuciWiz : 06-Oct-2006 at 00:32.
Reason: Please insert your C/C++ code between [cpp] & [/cpp] tags
|
|||
Recent GIDBlog
Problems with the Navy (Officers) by crystalattice
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| My new PC build. | theotherguy | Computer Hardware Forum | 4 | 05-Nov-2006 21:24 |
| VB Calendar application for smart device problem | adie_w | .NET Forum | 0 | 15-Feb-2006 04:13 |
| Small help with this build error!! | Krc784 | C++ Forum | 3 | 11-Nov-2004 13:05 |
| I plan to build a computer.... | jjansen | Computer Hardware Forum | 5 | 14-Apr-2004 05:55 |
| Help with calendar program | mike3340 | C++ Forum | 0 | 18-Nov-2003 20:25 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The