Welcome aboard fellow animal lover! We are really excited to have you here! 😉 Wildwatch is a program for a clerk managing wildlife data in a wildlife reserve via the Command Line Interface (CLI). Its main job is to store and present animal data required in everyday operations of the wildlife reserve.
This document specifies the architectural and software design decisions in the implementation of the WildWatch.
For a detailed guide on how to use the program and explanations on the individual commands, we have our very own WildWatch User Guide for your perusal.
The intended audience for this document are developers who would like to look under the hood and understand how WildWatch works, and are looking to introduce new functionalities into WildWatch.
Symbol | Meaning |
---|---|
❗ IMPORTANT | These are important instructions that you should follow. |
✏ Note | These are important details that you should take note of. |
⬆ Back to top | Click to scroll back up to the Table of Contents . |
🐵 🦊 🦁 | Animals indicate you have reached a new section. |
❗ IMPORTANT
- Capitalized words between angle brackets
< >
is a field to be filled up appropriately by the user.
- E.g.,
delete <INDEX>
should bedelete 2
- Anything between curly brackets
{ }
is an optional field that may or may not be filled up by the user.
- E.g.,
summary {<SPECIES>}
could besummary lion
orsummary
.
Ensure you have Java 11 or above installed in your Computer. (How do I install Java 11? What is my Java version?)
Download the latest WildWatch.jar
from here.
Copy the file into the folder you want to use as the home folder for your WildWatch.
Open a command terminal, cd
into the home folder you put the jar file in, and run the following command: java -jar WildWatch.jar
.
You should see the welcome screen as the diagram below.
Type commands beside >>>
and press Enter
to execute it.
(e.g. typing help
and pressing Enter
will show the help page).
____________________________________________________________
____ __ ____ __ __ _______
\ \ / \ / / | | | | | \
\ \/ \/ / | | | | | .--. |
\ / | | | | | | | |
\ /\ / | | | `----.| '--' |
\__/ \__/ |__| |_______||_______/
____ __ ____ ___ .___________. ______ __ __
\ \ / \ / / / \ | | / || | | |
\ \/ \/ / / ^ \ `---| |----`| ,----'| |__| |
\ / / /_\ \ | | | | | __ |
\ /\ / / _____ \ | | | `----.| | | |
\__/ \__/ /__/ \__\ |__| \______||__| |__|
____________________________________________________________
Hello there! Welcome to WildWatch!
Checking if "WildWatch.txt" already exists...
File does not exist.
Creating new file...
File created successfully.
What would you like to do?
____________________________________________________________
>>>
The Architecture Diagram above shows a high-level overview of the architectural design of WildWatch.
Actual detailed implementation may differ from the architectural diagram.
(e.g., Parser
in the diagram encompasses the Execute
, Error
, and Parser
packages).
WildWatch is comprised of 7 major components.
Main
: Entry point of the program.UI
: A package that receives input from, and prints output to the user.Parser
: A package that processes and interprets the input command of the user.Command
: A package that does specific task according to the command of the user.EntryList
: A package that stores all the wildlife data, while the program is running.Entry
: A package that stores individual wildlife data, while the program is running.Storage
: A package that saves and retrieves all the wildlife data from the local storageThe Generic Sequence Diagram above shows how the components in the architecture interact with each other for a generic command input in WildWatch.
✏ Note:
Command
here is a placeholder, and will be replaced by actual commands. e.g.,ListCommand
.
The Main
component, residing as a method in the WildWatch
class, which is the only class without a package, is the entry point of the program.
The UI
components can be found within the UI
package.
It prompts and reads commands from the user and sends the command to Execute
package to be executed.
Lastly, it prints an output message upon completion of the command, to show the success of failure of the command execution.
The Parser
components can be found within the Parser
package.
It is responsible for parsing the input String of the user, and returning an appropriate XYZCommand
class.
If the input is invalid, it throws exceptions to the Error
package for error handling.
The Parser Class Diagram below shows how Execute
, Parser
, Error
, Command
classes of their respective packages work together.
The Command
components can be found within the Command
package.
The above sequence diagram depicts how WildWatch executes an add
command.
The EntryList
class can be found within the Entry
package.
It is resposible for storing all the entry data in an static ArrayList
class.
It is responsible for “getting” and “setting” values of individual Entry
objects.
The Entry
class can be found within the Entry
package.
Each Entry
object holds the data of a single animal entry, residing in the static ArrayList
maintained by EntryList
class.
The class diagram above shows the relationship beteen the Entry
, EntryList
, and ArrayList
classes.
The Storage
components can be found within the Storage
package.
The components work together to read from previously saved file in the local memory.
The entry data is then loaded into the program.
If a valid command that changes the entry data is executed, the relevant changes are saved onto the local file.
The class diagram above shows the relationship between the different classes in the Storage
package.
Target user profile for WildWatch is the clerks working in wildlife reserves, who manages the wildlife data. Since our program is interacted through the Command Line Interface (CLI), someone who can type fast will definitely benefit from WildWatch. This would significantly boost one’s productivity. Since clerks are already accustomed to typing and working with a computer, this program would be ideal for this user profile.
Version | As a … | I want to … | So that I can … |
---|---|---|---|
v1.0 | new user | see help instructions | refer to them when I forget how to use the application |
v1.0 | zoo clerk | add an animal entry | record the animals in the zoo, and refer to them afterwards |
v1.0 | zoo clerk | delete an animal entry | remove redundant or invalid animal entry |
v1.0 | zoo clerk | list all the entries | see what entries I have entered previously, and refer to them |
v1.0 | zoo clerk | have an exit command | close the program safely |
v2.0 | zoo clerk | find an entry item by name | locate the entry I want, without having to go through the entire list |
v2.0 | zoo clerk | edit a command | change the entry contents to reflect the changes in the zoo |
v2.0 | zoo clerk | see a summary of all entries | have an idea of the entries at a glance |
v2.1 | zoo clerk | export the entries | easily move my data from one place to another |
help
command by typing help
and hitting the Enter
key on your keyboard.Run the following command add D/02-03-2023 S/Annam Leaf Turtle N/Ariel R/looks healthy
.
Expected: Wildlife recorded successfully added.
Run the following command add D/02-03-2023
.
Expected: No new recorded added.
list
.Run the following command edit I/1 D/02-05-2020 R/looks sick
.
Expected: Successfully edited the wildlife record.
Run the following command edit I/-1 D/02-05-2020 R/looks sick
.
Expected: Failed to edit as -1 is not a valid index.
Run the following command delete 1
.
Expected: Successfully deleted the first record.
Run the following command delete 0
.
Expected: Failed to delete a record as 0 is an invalid record.
summary
. export myobservations.csv
. bye
command.Action | Format |
---|---|
Getting Help | help |
Adding Entries | add D/<DATE> S/<SPECIES> N/<NAME> {R/<REMARKS>} |
Adding Entries (interactive) | add i/ |
Deleting Entries | delete <INDEX> |
Finding Entries | find <SEARCH> |
Editing Entries | edit I/<INDEX> {D/<DATE>} {S/<SPECIES>} {N/<NAME>} {R/<REMARKS>} |
Summarizing Entries | summary {<SPECIES>} |
Listing Entries | list |
Exporting Entries | export {<FILENAME>} |
Exit | bye |
We are here to help you with terminologies used in the user guide, that may not be familiar to you.
Terminology | Meaning |
---|---|
Command Line Interface | A way to communicate with your computer using texts. |
Home Folder | Folder in which your program resides |
Reference - woodenclock
Reference - AB3 Developer Guide
Meet the people behind WildWatch!