logo Use SA10RAM to get 10%* Discount.
Order Now logo

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

expert
Venktesh PrasaadMarketing
(5/5)

556 Answers

Hire Me
expert
Pankaj KukrejaSociology
(5/5)

767 Answers

Hire Me
expert
Joann DomettCriminology
(5/5)

931 Answers

Hire Me
expert
StatAnalytica ExpertSociology
(5/5)

821 Answers

Hire Me
Java Programming

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.
*/

Related Questions

. The fundamental operations of create, read, update, and delete (CRUD) in either Python or Java

CS 340 Milestone One Guidelines and Rubric  Overview: For this assignment, you will implement the fundamental operations of create, read, update,

. 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

Retail Transaction Programming Project  Project Requirements:  Develop a program to emulate a purchase transaction at a retail store. This

. The following program contains five errors. Identify the errors and fix them

7COM1028   Secure Systems Programming   Referral Coursework: Secure

. Accepts the following from a user: Item Name Item Quantity Item Price Allows the user to create a file to store the sales receipt contents

Create a GUI program that:Accepts the following from a user:Item NameItem QuantityItem PriceAllows the user to create a file to store the sales receip

. The final project will encompass developing a web service using a software stack and implementing an industry-standard interface. Regardless of whether you choose to pursue application development goals as a pure developer or as a software engineer

CS 340 Final Project Guidelines and Rubric  Overview The final project will encompass developing a web service using a software stack and impleme

Get Free Quote!

344 Experts Online