logo Use CA10RAM to get 10%* Discount.
Order Nowlogo
(5/5)

Ella needs a CLI (Command Line Interface) program written in Java to maintain her contact list efficiently

INSTRUCTIONS TO CANDIDATES
ANSWER ALL QUESTIONS

Problem

Ella needs a CLI (Command Line Interface) program written in Java to maintain her contact list efficiently. Each of her contacts contains a name (full name), a phone number, and email, and an address. She’d like to be able to do the following functions. 

  1. Load contacts from a text file
  2. View all contacts
  3. Add new contact
  4. Edit a contact 
  5. Delete a contact
  6. Search the contact list by a given string
  7. Sort the contact list by one of the given fields
  8. Save contacts to a text file
  9. Quit 

The CLI should look like the one below. Note that Ella may accidentally enter an input that is not in the format that you expect, e.g. “ABC” instead of “2”. For any invalid inputs, the program must gracefully display an error message and let Ella re-enter again. The program only stops when she selects the function to quit. It must not stop or crash in any other circumstances. This fault-tolerance principle is applied to all program inputs. 

CLI

  1. Load contacts from file
  2. View all contacts
  3. Add new contact
  4. Edit a contact
  5. Delete a contact
  6. Search contact list
  7. Sort contact list
  8. Save contacts to file
  9. Quit

Select a function (1-9):

The classes that are useful to you are File, Scanner, and PrintWriter. You can assume that the text file resides in the same directory with your program. The text file stores several contacts. Each contact is written in a line and has its fields separated by “;” like this example. 

 

The contacts need to be in a text file.

contacts.txt 

John Smith; 0901234567; johns@yahoo.com; 120 Le Thanh Ton, D1, HCMC
Nguyen Minh Toan; 02837761300; toan.nguyen@abc.com; 78 Le Van Sy, D3, HCMC
Bui Van Ba; 0913437582; ba.bui@gmail.com; 18 Nguyen Thi Thap, D7, HCMC
Ngo Hung; 0927654321; hung@outlook.com; 89 Phan Dinh Phung, Ba Dinh, Ha Noi
Tran Tieu Vy; 0339997264; vy.tran@gmail.com; 5 Le Duan, Hai Chau, Da Nang

Coding Style 

  • Follow this Java Naming Conventions(Links to an external site.). 
  • Provide a useful comment for each section of code (a class, a method, a code block) or a clever line of code which might be difficult for others to understand. 
  • Each source code file (.java) must have the following header at the top. 

/*
  RMIT University Vietnam
  Course: INTE2512 Object-Oriented Programming
  Semester: 2019C
  Assessment: Assignment 1
  Author: Your name (e.g. Nguyen Van Minh)
  ID: Your student id (e.g. 1234567)
  Created  date: dd/mm/yyyy (e.g. 31/03/2019)
  Last modified: dd/mm/yyyy (e.g. 05/04/2019)
  Acknowledgment: If you use any resources, acknowledge here. Failure to do so will be considered as plagiarism.
*/

(5/5)
Attachments:

Related Questions

. Introgramming & Unix Fall 2018, CRN 44882, Oakland University Homework Assignment 6 - Using Arrays and Functions in C

DescriptionIn this final assignment, the students will demonstrate their ability to apply two ma

. The standard path finding involves finding the (shortest) path from an origin to a destination, typically on a map. This is an

Path finding involves finding a path from A to B. Typically we want the path to have certain properties,such as being the shortest or to avoid going t

. Develop a program to emulate a purchase transaction at a retail store. This program will have two classes, a LineItem class and a Transaction class. The LineItem class will represent an individual

Develop a program to emulate a purchase transaction at a retail store. Thisprogram will have two classes, a LineItem class and a Transaction class. Th

. SeaPort Project series For this set of projects for the course, we wish to simulate some of the aspects of a number of Sea Ports. Here are the classes and their instance variables we wish to define:

1 Project 1 Introduction - the SeaPort Project series For this set of projects for the course, we wish to simulate some of the aspects of a number of

. Project 2 Introduction - the SeaPort Project series For this set of projects for the course, we wish to simulate some of the aspects of a number of Sea Ports. Here are the classes and their instance variables we wish to define:

1 Project 2 Introduction - the SeaPort Project series For this set of projects for the course, we wish to simulate some of the aspects of a number of

Ask This Question To Be Solved By Our ExpertsGet A+ Grade Solution Guaranteed

expert
Um e HaniScience

551 Answers

Hire Me
expert
Muhammad Ali HaiderFinance

622 Answers

Hire Me
expert
Husnain SaeedComputer science

776 Answers

Hire Me
expert
Atharva PatilComputer science

938 Answers

Hire Me