$125
Welcome to Assignment 2 for COMP90041 - Programming and Software Development!
In this assignment, we will extend the Calendar Console to add new features
like -
• Calendar Views - Monthly, Fortnightly, Weekly
• Different kinds of events - Timed Events, All-day Events
• Loading the calendar events from a file • Saving the modified calendar events into a file
• Managing Exceptions while reading the file.
Preamble: "The Specifications"
The slides from this lesson module for the assignment act as "the specifications" for the system we are about to build.
"The specifications" in real-life software development is the document that details the features that should be implemented in any particular project. They are the features and requirements that you, the Software Developer, and the client have agreed should be implemented in the system.
As such, you should read these specifications carefully and ensure that your program implements the requirements of the specification correctly.
Tests will be run on your program to check that you have implemented these specifications correctly. Note that for the Assignment 2, we will provide 10 visible tests and 6 hidden tests that you can run to check that the basic functionality of your system is correct.
Tip: Look at the assets file present. Think about what can the hidden test cases be about by looking at the data and perform your own testing.
So once your program passes the basic tests, we strongly recommend that you perform further tests yourself, to ensure that the required features have been implemented correctly.
How to read the specifications?
• We will show some of the scenarios as valid/expected/best-case scenarios. This section will be marked in green. This means that for these sections, we will not provide any incorrect inputs or ill-formatted
inputs.
Best Case Scenario: This section describes a real-life intended scenario.
• Some of the specifications will be referred back from Assignment 1.
This will be notified using a green strip as shown below -
Carried Forward: This section is referred as is from Assignment 1
• Some inputs to the program can be invalid and should be handled accordingly by the program. These unexpected but valid scenarios will
be tested and are shown below -
• Other specifications can be referred from Assignment 1 with slight
modifications. This will be notified using a yellow strip.
Modifications: This section is referred from Assignment 1 with slight modifications
• New additions to the assignment will be marked using blue callouts
like below-
Addition: This specification is entirely new to Assignment 2.
embedded as a red strip in the specifications.
Out of Scope Scenario: This scenario ........ is out of scope for this assignment
callouts.
• Also, note that the code snippets have some bold characters that
represent the inputs to the program.
Preamble: Intended Learning Outcomes
The Intended Learning Outcomes for the final Project are mentioned below -
• Control Flows - use branching and looping to navigate the special use
cases in specifications.
• Classes - identify the entities and encapsulate their data and actions together in a class.
• Arrays - to use 1D and 2D arrays and perform associated operations
• Packages - identify and group logical entities(classes) together
• Javadoc - generate javadocs from comments used in classes
• UML - generate a UML Diagram for the classes
• Inheritance - implement polymorphism correctly
• Interfaces - implement some operations via interfaces
• File Handling - reading and writing data from/to different files. Don't
use java.nio.Files methods.
• Exception Handling - handle exceptions gracefully and appropriately
applies to incorrect usage.
• Generics - Generics are optional for this assignment. Implementing Generics is not the same as using Generics like ArrayList<>. No
Preamble: Structure and Style
We will also be assessing your code for good structure and style.
Use methods when appropriate to simplify your code, and avoid duplicate code.
Use correct Java naming conventions for class names, variable names, and method names and put them in a well-organised way in your code i.e. it should be readable as well. Look at the conventions provided by Oracle here.
The code structure in a file is very important and improves readability.
Look at the code organisation conventions provided by Oracle here. Make sure the names you choose are meaningful to improve the readability of your code.
Ensure to add meaningful comments in between your code and Javadoc comments for classes and methods.
We will provide a marking scheme to help guide you in the development of your program. Also we will guide you how to model your program. But using correct syntaxes and conventions can be learnt here.
Calendar Entities
Calendar Console have changed. Here is some information about the data Calendar Console can process.
• Monthly - This view is inherited from Assignment 1. This has 6 rows for weeks.
• Fortnightly - This view is new for Assignment 2. This view shows 2
weeks.
• Weekly - This view only shows 1 week.
Each event in a calendar entry has a description. Events can either be
• a timed event - A timed event can be of type MEETING, REMINDER.
Timed Events also have start and end times in the format HH: mm.
• an all-day event - An all-day event does not have any start or end time but runs all day. These could be of type BIRTHDAY, ANNIVERSARY, OUT_OF_OFFICE, PUBLIC_HOLIDAY are also considered non-working
days.
Assumption: Though Sat/Sun are non-working days but are not tested in this Assignment
2. You can ignore handling any special scenarios for these days in your assignment
A timed event on a non-working day has a special criterion. If someone tries to set up a meeting that conflicts with an existing scheduled meeting or a meeting is set up on a non-working day, the program will send an email to reschedule the event.
Pro Tip: Sending an email here simply uses print statements. No overly complicated coding required for the assignment.
File Handling & Command Line Args
Command Line Arguments
• Calendar view type to show the number of rows. These values could
be MONTHLY, FORTNIGHTLY, or WEEKLY.
• An events file path to load the events from
$java CalCon 2025-05-26 MONTHLY assets/events1.txt
Error Scenarios
The program can face below error scenarios and must handle them by
printing the error messages accordingly and terminating the program.
• Less than 3 arguments present. Print Invalid Command Line Args.
Exiting Program.
Program.
• Invalid view type provided. E.g. - MONTHLYYYY. Print Invalid calendar view type. Exiting Program.
If valid command line arguments are present, initialise the calendar.
File Handling
Once the calendar is initialised, it is important to read some data from the files and load them into the appropriate objects of classes. The files are present in assets folder.
Assumption: While handling the files in code, you can assume the folder name assets remain unchanged.
File Data Description
The file has data in a comma-separated format. Where data is missing, the comma will still be present. The file has a header that describes the data
present in it. The order of the data will always remain the same.
2. event_type (Mandatory) - TIMED or ALL_DAY event. Other values will
be considered Invalid.
3. event_sub_type (Mandatory) - subtypes for TIMED or ALL_DAY events. See the list associated with the types here. Other values will be
considered Invalid.
4. start_time (Optional) - this is only present in case of TIMED events and
represents the start time of the event. Otherwise empty.
5. end_time (Optional) - this is only present in case of TIMED events and
represents the end time of the event. Otherwise empty.
6. Description (Mandatory) - a description for the event.
Order of reading the data
1. The program should start by reading the Events file present in the
command line arguments.
2. The first row is the header row, just for your information. The program
must ignore this while reading the data.
3. Any empty line is simply skipped. Read the next available line.
4. Iterate through all the rows of the file mentioned in the command line args, then the program should start processing each line by splitting
the data by comma and processing individual data points.
invalid data or an invalid line format. In this case, skip the line and proceed to read the next line. The program must not be terminated.
See the next section for Exception handling.
Writing the files back
The program must write the changes made to the events during the program execution back to the events file using the filename provided to the program in the command line argument. The data is read from the calendar. For those dates where one or more events are present, the program will write the data back to the file. The order of the events is maintained by the order of insertion in the events array.
While writing the data back, the header must be reserved as is. The program must update the events file only once at the end of the program when the user has quit from the main menu (See Option 4 in Main Menu slides)
IMPORTANT: Do not forget to use printWriter.flush() methods even though it is not BufferedWriter. Sometimes files in EdStems are not written back.
As you write into the files, your files modify. While running all the test cases, subsequent test cases works on modified file data. So if you face any error, recheck the file data saved.
NOTE: Windows vs Linux FileSystems handle folder path differently, You must comply to what EdStem follows i.e. Linux style paths.
Exception Handling with Files
Exceptions during File Handling
1. FileNotFoundException or IOException - The file paths that are provided to the program are not present in the directory. Or are unavailable for File read/write operations. In this case, Java raises FileNotFoundException or IOException. Your program should print the error message and terminate the program. Generally, these would never happen while writing the file, but only while reading the file. But the program must handle both cases in the code.
Unable to process file. Exiting program.
2. InvalidLineException - Every file expects a minimum number of fixed data points. When there are fewer than 6 data points present in a line, the program should raise an InvalidLineException, skip reading the line, print an error message and move on to the next line.
Invalid Event Line. Skipping this line.
3. InvalidFormatException - Some data points are expected to be in a particular format or are mandatory. If they are not in the correct format, the program must print an appropriate error message, skip the line and move on
to the next line.
Note that if one line has more than one error, only first error encountered is printed and the program moves on to the next line.
The order of processing the datapoints and respective errors is as follows -
• If the event type is missing or incorrect, print Incorrect Event type.
Skipping this line.
• If the event subtype is missing or incorrect, print Incorrect All Day
event type. Skipping this line. or Invalid Timed event type. Skipping this line.
• If the start or end times are empty, print Start Time cannot be
empty. Skipping this line. or End Time cannot be empty. Skipping this line.
• If the start or end times are incorrect format, like 25:67, print
Incorrect Start Time format. Skipping this line. or Incorrect End Time format. Skipping this line.
• If the event description is empty, print Event Description is empty.
Assumption: Since we are reading a comma separated file, none of the string data like description will have a comma as a data. Comma is only used to represent data delimiter and not data itself.
4. NotFoundException -
Worst Case Scenario: Remember that the method that throws the exception does not catch and handle it. See the marking scheme.
Exceptions during Program Execution
There are no exceptions thrown during Program Execution, but they are handled using logic. See the next few slides on program execution for details.
Main Menu
Calendar Initialisation
Modifications: This section is referred from Assignment 1 with slight modifications.
FORTNIGHTLY
------------------------------------ | M | T | W | T | F | S | S |
------------------------------------
| 02 | 03 | 04 | 05 | 06 | 07 | 08 |
| x | | | | | | |
| | | | | 2 | | |
------------------------------------
| 09 | 10 | 11 | 12 | 13 | 14 | 15 |
| | | | | | | |
| | | | | | | |
------------------------------------ WEEKLY
------------------------------------ | M | T | W | T | F | S | S |
------------------------------------
| 02 | 03 | 04 | 05 | 06 | 07 | 08 |
| | | | | x | | |
| 2 | | 1 | | 2 | | |
------------------------------------
The next thing to show is the main menu for the user to select and perform some operations.
Modifications: This section is referred from Assignment 1 with slight modifications.
------------------------------------ | M | T | W | T | F | S | S |
------------------------------------
| 02 | 03 | 04 | 05 | 06 | 07 | 08 |
| x | | | | | | |
| 2 | | 1 | | 2 | | |
------------------------------------
Select an option to proceed.
Press 2 to enter current selection's sub menu.
Press 3 to view all events in a calendar.
Press 4 to exit.
>
------------------------------------ | M | T | W | T | F | S | S |
------------------------------------
| 26 | 27 | 28 | 29 | 30 | 31 | 01 |
| x | | | | | | |
| | | 2 | 1 | 1 | | |
------------------------------------
Select an option to proceed.
Press 2 to enter current selection's sub menu.
Press 3 to view all events in a calendar.
Press 4 to exit.
> 1
------------------------------------ | M | T | W | T | F | S | S |
------------------------------------
| 26 | 27 | 28 | 29 | 30 | 31 | 01 |
| | x | | | | | |
| | | 2 | 1 | 1 | | |
------------------------------------
Select an option to proceed.
Press 2 to enter current selection's sub menu.
Press 3 to view all events in a calendar.
Press 4 to exit.
>
Note: The text in bold represents user input here. You don't need to make the console inputs bold in your code.
Option 2: Sub Menu
Carried Forward: This section is referred as is from Assignment 1
------------------------------------ | M | T | W | T | F | S | S |
------------------------------------
| 26 | 27 | 28 | 29 | 30 | 31 | 01 |
| | | x | | | | |
| | | 2 | 1 | 1 | | |
------------------------------------
Select an option to proceed.
Press 2 to enter current selection's sub menu.
Press 3 to view all events in a calendar.
Press 4 to exit.
> 2
Press V to view all events.
Press A to add an event.
Press E to edit an event.
Press D to delete an event. Press Q to exit.
Submenu handling is discussed here.
Option 3: Printing all events.
Modifications: This section is referred from Assignment 1 with slight modifications.
If the user wants to see all the events marked in the calendar, the program must present them in a tabular form. The program must show only the events present in the calendar view and not all the events read from the file.
------------------------------------ | M | T | W | T | F | S | S |
------------------------------------
| 26 | 27 | 28 | 29 | 30 | 31 | 01 |
| | | x | | | | |
| | | 2 | 1 | 1 | | |
------------------------------------
Select an option to proceed.
Press 2 to enter current selection's sub menu.
Press 3 to view all events in a calendar.
Press 4 to exit.
> 3
----------------------------------------------------------------------------
--------------------------------------------------------------------
----------------------------------------------------------------------------
--------------------------------------------------------------------
1 2025-05-28 ALL_DAY OUT_OF_OFFICE
On Vacation - Canada
2 2025-05-28 TIMED MEETING 09:00 09:20
Some random event
3 2025-05-29 ALL_DAY OUT_OF_OFFICE
On Vacation - Canada
4 2025-05-30 ALL_DAY OUT_OF_OFFICE
On Vacation - Canada
----------------------------------------------------------------------------
--------------------------------------------------------------------
Tip: Use the formatter %2s%12s%12s%20s%12s%12s%40s%n to print the header and the events.
However, if the calendar has no events, the program should show an error message.
------------------------------------ | M | T | W | T | F | S | S |
------------------------------------
| 26 | 27 | 28 | 29 | 30 | 31 | 01 |
| | | x | | | | |
| | | | | | | |
------------------------------------
Select an option to proceed.
Press 2 to enter current selection's sub menu.
Press 3 to view all events in a calendar.
Press 4 to exit.
> 3
No events present in the calendar.
------------------------------------ | M | T | W | T | F | S | S |
------------------------------------
| 26 | 27 | 28 | 29 | 30 | 31 | 01 |
| | | x | | | | |
| | | | | | | |
------------------------------------
Select an option to proceed.
Press 2 to enter current selection's sub menu.
Press 3 to view all events in a calendar. Press 4 to exit.
Option 4: Exit Option
Carried Forward: This section is referred as is from Assignment 1
In case the user selects option 4, the program must gracefully quit the program and print a goodbye message.
Look at the complete output below.
------------------------------------ | M | T | W | T | F | S | S |
------------------------------------
| 26 | 27 | 28 | 29 | 30 | 31 | 01 |
| x | | | | | | |
| | | 2 | 1 | 1 | | |
------------------------------------
Select an option to proceed.
Press 2 to enter current selection's sub menu.
Press 3 to view all events in a calendar.
Press 4 to exit.
> 4
Exiting CalCon Now.
Invalid Command
Carried Forward: This section is referred as is from Assignment 1
In case the user provides an invalid input, like 8 or 9, the program should be able to print “Invalid Input” and show the main menu. Sample output
------------------------------------ | M | T | W | T | F | S | S |
------------------------------------
| 26 | 27 | 28 | 29 | 30 | 31 | 01 |
| x | | | | | | |
| | | 2 | 1 | 1 | | |
------------------------------------
Select an option to proceed.
Press 2 to enter current selection's sub menu.
Press 3 to view all events in a calendar.
Press 4 to exit.
> 6
Invalid input.
------------------------------------
| M | T | W | T | F | S | S |
------------------------------------
| 26 | 27 | 28 | 29 | 30 | 31 | 01 |
| x | | | | | | |
| | | 2 | 1 | 1 | | |
------------------------------------
Select an option to proceed.
Press 2 to enter current selection's sub menu.
Press 3 to view all events in a calendar.
Press 4 to exit.
>
Out of Scope: The program only expects an integer value for the main menu. You do not need to handle string or double values as input at this point of time for the main menu.
SubMenu
Once the submenu is printed, the user can take multiple actions.
Option A: Adding an event
Modifications: This section is referred from Assignment 1 with slight modifications
Adding a Timed Event
Press V to view all events.
Press A to add an event.
Press E to edit an event.
Press D to delete an event.
Press Q to exit.
> A
To add an event, enter the following details
Event Type (ALL_DAY, TIMED) : TIMED
Event SubType (REMINDER, MEETING) : MEETING
Start Time (HHmm) : 10:30
End Time (HHmm) : 11:30
Description : Some random meeting
Event added successfully.
Press V to view all events.
Press A to add an event.
Press E to edit an event.
Press D to delete an event.
Press Q to exit.
>
Adding an All Day Event
Press V to view all events.
Press A to add an event.
Press E to edit an event.
Press D to delete an event.
Press Q to exit.
> A
To add an event, enter the following details
Event Type (ALL_DAY, TIMED) : ALL_DAY
Event SubType (BIRTHDAY, ANNIVERSARY, OUT_OF_OFFICE, PUBLIC_HOLIDAY) : OUT_OF_OFFICE
Description : Sick Leave Event added successfully.
Press V to view all events.
Press A to add an event.
Press E to edit an event.
Press D to delete an event.
Press Q to exit.
>
Assumption: All inputs are valid. Invalid inputs not tested in add/edit events.
Option E: Editing an event
Modifications: This section is referred from Assignment 1 with slight modifications
Press V to view all events.
Press A to add an event.
Press E to edit an event.
Press D to delete an event.
Press Q to exit.
> E
To edit an event, select an event number from below -
Following event(s) found for the day -
1. MEETING Event : 15:00 - 16:00 : Coffee chat with mentor
2. REMINDER Event : 08:00 - 08:05 : Check dishwasher maintenance
3. REMINDER Event : 15:00 - 15:15 : Call Tax office > 3
To edit this event, enter the following details Event Type (ALL_DAY, TIMED) : TIMED
Event SubType (REMINDER, MEETING) : REMINDER
Start Time (HHmm) : 16:00
End Time (HHmm) : 16:15 Description : Call Tax office
Event updated successfully.
Press V to view all events.
Press A to add an event.
Press E to edit an event.
Press D to delete an event.
Press Q to exit.
>
Editing an All Day Event
Press V to view all events.
Press A to add an event.
Press E to edit an event.
Press D to delete an event.
Press Q to exit.
> E
To edit an event, select an event number from below -
Following event(s) found for the day -
1. OUT_OF_OFFICE Event : Sick Leave
> 1
To edit this event, enter the following details
Event Type (ALL_DAY, TIMED) : ALL_DAY
Event SubType (BIRTHDAY, ANNIVERSARY, OUT_OF_OFFICE, PUBLIC_HOLIDAY) : OUT_OF_OFFICE
Description : Sick Leave updated
Event updated successfully.
Press V to view all events.
Press A to add an event.
Press E to edit an event.
Press D to delete an event.
Press Q to exit.
>
Option D: Deleting an event
Carried Forward: This section is referred as is from Assignment 1
Deleting an event is similar to editing an event. The user must choose the event number from the list of events present on the day to delete. See the output below -
Press V to view all events.
Press A to add an event.
Press E to edit an event.
Press D to delete an event.
Press Q to exit.
> D
To delete an event, select an event number from below -
Following event(s) found for the day -
1. MEETING Event : 15:00 - 16:00 : Coffee chat with mentor
2. REMINDER Event : 08:00 - 08:05 : Check dishwasher maintenance
> 2
Event deleted successfully.
Press V to view all events.
Press A to add an event.
Press E to edit an event.
Press D to delete an event.
Press Q to exit.
>
If the user selects option V after this, the deleted event should not be present
in the list.
Option V: Viewing an event
Modifications: This section is referred from Assignment 1 with slight modifications
Viewing a day's events will simply list all the events present on the selected
day, but in a concise manner.
• Timed Events show the event subtype, start and end time along with
the description.
• All Day Events show the event subtype and the description.
Press V to view all events.
Press A to add an event.
Press E to edit an event.
Press D to delete an event.
Press Q to exit.
> V
Following event(s) found for the day - 1. OUT_OF_OFFICE Event : On Vacation - Canada
2. MEETING Event : 09:00 - 09:20 : Some random event
Tip: Use the formatter "%d. %s Event : %s - %s : %s%n" to print a Timed event for the day and "%d. %s Event : %s%n" to print a All Day event.
Option Q: Quitting the submenu
Carried Forward: This section is referred as is from Assignment 1
If the user selects Q, the program must quit the submenu, print the calendar view and go back to the main menu.
Press V to view all events.
Press A to add an event.
Press E to edit an event.
Press D to delete an event.
Press Q to exit.
> Q
------------------------------------ | M | T | W | T | F | S | S |
------------------------------------
| 02 | 03 | 04 | 05 | 06 | 07 | 08 |
| x | | | | | | |
| 2 | | 1 | | 2 | | |
------------------------------------
Select an option to proceed.
Press 2 to enter current selection's sub menu.
Press 3 to view all events in a calendar.
Press 4 to exit.
>
Invalid Option
Carried Forward: This section is referred as is from Assignment 1
Note that the submenu receives an input string for A/E/D/V/Q. Thus, any input which is a string but is not a valid option should be handled accordingly, with an error message printed.
Press V to view all events.
Press A to add an event.
Press E to edit an event.
Press D to delete an event.
Press Q to exit.
> K
Invalid input.
Press V to view all events.
Press A to add an event.
Press E to edit an event.
Press D to delete an event.
Press Q to exit.
>
Special Case
Case 1: No events present for the day.
Carried Forward: This section is referred as is from Assignment 1
In case of editing/deleting/viewing, if there are no events present for the day, show the error message and print the submenu.
Press V to view all events.
Press A to add an event.
Press E to edit an event.
Press D to delete an event.
Press Q to exit.
> V
There are no events marked in the calendar for the day.
Press V to view all events.
Press A to add an event.
Press E to edit an event.
Press D to delete an event.
Press Q to exit.
>
Case 2: Meetings on Non-Working Days
Addition: This specification is entirely new to Assignment 2.
Press V to view all events.
Press A to add an event.
Press E to edit an event.
Press D to delete an event.
Press Q to exit.
> A
To add an event, enter the following details Event Type (ALL_DAY, TIMED) : TIMED
Event SubType (REMINDER, MEETING) : MEETING
Start Time (HHmm) : 10:30
End Time (HHmm) : 11:30
Description : Some random meeting
Event added successfully.
I am not available today. Please reschedule the event.
Press V to view all events.
Press A to add an event.
Press E to edit an event.
Press D to delete an event.
Press Q to exit.
>
Assumption: Adding other kind of events to a Non Working day is not tested.
Case 3: Conflicts in various meeting timings
Addition: This specification is entirely new to Assignment 2.
While adding/editing the meeting has a time overlap with other meetings i.e.
• the meeting has same start time as any other meeting
• the meeting has an end time after the start of any other meeting but
before the end time of the other meeting
• the meeting has a start time after the start time of the other meeting
but before the end time of the other meeting
• the meeting has a start time before the start time of the other
meeting, but has an end time after the start time of the other meeting. In this case, the program should send an email(create a method sendEmail() that prints the error message There is a conflict for this event, Reschedule the event.
Press V to view all events.
Press A to add an event.
Press E to edit an event.
Press D to delete an event.
Press Q to exit.
> V
Following event(s) found for the day - 1. REMINDER Event : 14:00 - 14:15 : Take medicine 2. MEETING Event : 10:30 - 11:30 : Team sync-up
Press V to view all events.
Press A to add an event.
Press E to edit an event.
Press D to delete an event.
Press Q to exit.
> A
To add an event, enter the following details Event Type (ALL_DAY, TIMED) : TIMED
Event SubType (REMINDER, MEETING) : REMINDER
Start Time (HHmm) : 10:45
End Time (HHmm) : 11:00 Description : Call mom.
Event added successfully.
There is a conflict for this event, Reschedule the event.
Press V to view all events.
Press A to add an event.
Press E to edit an event.
Press D to delete an event.
Press Q to exit.
>
Note:
1. Reminder and Meeting can conflict. Also, Non Working Day and meeting can conflict but is considered in Case 2.
2. SendEmail functionality only applies to certain AllDayEvent and all TimedEvent.
3. See FAQ to understand when to send an email for Case 2 and Case 3.
Out of Scope Scenario: Birthday/Anniversary overlapped with Meeting/Reminder/Non-Working Days are not tested.
Guidance: Object Oriented Programming
Quick Tips
• Now that you know about UML, perhaps start designing your solutions by creating a UML diagram first. Think about what classes need to be created. Some of them are provided to you as a scaffold. You can
create other classes as well.
• The second step is to associate appropriate data with appropriate
classes. Create the data fields as instance variables in those classes.
• The third step would be to create the exceptions.
• The next step is file handling. This will take the maximum amount
of time.
• The next step is to create a structure for running the menu options with the different Control Flows you have learned.
• Exceptions thrown in a method are not handled in the same method. You should handle them with try-catch block in some other methods where you are invoking the method that is causing the exception. For example, when you use Integer.parseInt and the parseInt method throws a NumberFormatException, you handle it in the method where
you are using the Integer.parseInt.
• Create packages to logically group entities and interfaces, and
exceptions as well.
• Think about enums.
Interfaces & Inheritance
• Implement the inheritance between related entities. You must have
at least one inheritance hierarchy.
• Think about what the common operations are for different entities. Interfaces are implemented where unrelated/related entities can have similar behaviour but different implementations. You must create
and implement at least one interface.
File Parsing
• Use a simple Scanner and PrintWriter instead of over-complicating the reading/writing. Try to minimise duplicate code associated with
reading and writing.
• Do not forget to use flush() for writing.
• When you read the files, you can read the entire line and then split the data on commas. This shall provide you with different data points in an array. Check the split method in the String class here. You can use
this method to perform a split on comma.
JavaDoc
Your code should be annotated using javadoc comments. We will generate the javadoc for your code. You do not need to submit it. You can run javadoc on your machine (up to any levels of nested packages) by running the
command
$ javadoc -d docs/ **/*.java
UML
assignment.
• There are some classes present, but they are not grouped in packages.
You must create packages and add the classes to some packages.
• There are some sample packages created that you can use.
methods present there.
• The italicised class means it is an abstract class also denoted by
<<abstract>>, and the italicised method is an abstract method. You are
free to change the definition of the abstract method by adding parameters if you see that is fit, but the Event class must be
abstract.