Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a Junit test case for minimum character only public void menu(Get get) throws IOException, FileNotFoundException { Character min = 'a'; Character max = 'f';

Write a Junit test case for minimum character only

public void menu(Get get) throws IOException, FileNotFoundException { Character min = 'a'; Character max = 'f'; Inputs input = new Input(); while(true) { System.out.println("a. Import contacts from file"); System.out.println("b. Add contact"); System.out.println("c. Delete contact"); System.out.println("d. Search contact"); System.out.println("e. List contact list"); System.out.println("f. Exit program"); Character info = scan.next().toLowerCase().charAt(0); switch (info) { case 'a': System.out.println("Enter directory: "); System.out.println("no extension"); String contact = scan.next() + ".txt"; File file = new File(contact); get.readFromFile(file); break; case 'b': get.add(input); break; case 'c': System.out.println("Enter last name"); String remove = scan.next(); get.remove(remove + ".*"); break; case 'd': System.out.println("Search by last name:"); String last = scan.next(); ab.find(last + ".*"); break; case 'e': get.list(); break; case 'f': System.out.println("Stopping the program"); System.exit(0); default: System.out.println("A - F only"); break; } } }

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions