The goals of this assignment are to help you learn how to:
- write a Java class
- add components to a lanterna-based app
- use and ArrayList of objects
- write to a file
To start, create a directory named a2 (lowercase a) in your repository and change your working directory to a2.
Next, execute the following commands to download the starter files for this assignment.
$ curl -O www.n0code.net/work/teaching/courses/csci200/code/contacts/Makefile $ curl -O www.n0code.net/work/teaching/courses/csci200/code/contacts/ContactsApp.java $ curl -O www.n0code.net/work/teaching/courses/csci200/code/contacts/Contact.java
Now, compile the source code by issuing the following command.
And now run the app using the following command.
$ make run
- Add the following fields along with getters and setters to Contact.java. Note: You do not need to validate the input at this time.
- First Name
- Last Name
- Mobile Phone
- Personal Email
- Web Page
- Add the following to ContactsApp.java
- Labels and TextBoxes for each of the fields in Contact.java.
- Code in SaveButtonHandler so that when the user presses the “Queue Contact” button, the newContact object has all of its fields set.
- Code in WriteButtonHandler so that when the user presses the “Write To File” button, all of the fields of each contact are written to contacts.txt. Include colons between the field data.
- When you’ve completed he assignment do the following:
make cleanto remove all class files from your working directory.
- Add a2 to your repository’s staging area
- Commit the changes to your repository
- Push your changes to GitHub