Earn Higher Grades With Instant Assignment Help.Ask Question!

Java Programming
(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; [email protected]; 120 Le Thanh Ton, D1, HCMC
Nguyen Minh Toan; 02837761300; [email protected]; 78 Le Van Sy, D3, HCMC
Bui Van Ba; 0913437582; [email protected]; 18 Nguyen Thi Thap, D7, HCMC
Ngo Hung; 0927654321; [email protected]; 89 Phan Dinh Phung, Ba Dinh, Ha Noi
Tran Tieu Vy; 0339997264; [email protected]; 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.
*/

Attachments:
(5/5)

Related Questions

CSI 1420 Introduction to C Programming & 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 majorconstructs of the C programming language – Fu

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 Assignment To Be Done By Our ExpertsGet A+ Grade Solution Guaranteed

expert
joyComputer science
(4/5)
12 Answers Hire Me
expert
Robert DLaw
(4.8/5)
986 Answers Hire Me
expert
Dr Samuel BarberaStatistics
(5/5)
893 Answers Hire Me
expert
Tutor For YouEconomics
(5/5)
538 Answers Hire Me