I have most of it done, I just need help fixing some things. import java.util.Scanner; public class
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Description: You are to add the necessary features and class to complete the AddressBook class code provided. See the java file Main.java. The given class must: Add a person to a "database" (an array) Search the database for a person given the name. Delete a person in the database given the name of the person. Display all the people (on the console) in the database using the following format (not in italics): Name Bob Sue Phone Number 451-1234 723-5832 Currently the class contains methods to display the menu (displayMenu()), get the users choice (getChoice()), delete a person from the database (remove()), and a main method to test the features. There are also the UI methods addperson() (which gets the person info to add and calls the add() method), deletePerson() (which gets the name of the person to delete and calls the remove() method), and findPerson() (which gets the name of the person to find and calls the search() method). The method run() runs the UI methods. You will need to provide a search method (which is required by the remove() method), add a person to the database (add()) and displayAll() method to display the records. You will also need to add to findPerson() method your display code of the person found using the same format as displayAll() to display the single record. search(String name) - given the name of the person to find, returns the position of that entry in the address book (database) OR returns -1 indicating not found. add() - given a new person's data (name and phone number) adds it to the address book (database) displayAll() - display all the records in the address book (database) using the described format. Use a spacing of 20 chars for the name and 15 for the phone number and left justify it. Description: You are to add the necessary features and class to complete the AddressBook class code provided. See the java file Main.java. The given class must: Add a person to a "database" (an array) Search the database for a person given the name. Delete a person in the database given the name of the person. Display all the people (on the console) in the database using the following format (not in italics): Name Bob Sue Phone Number 451-1234 723-5832 Currently the class contains methods to display the menu (displayMenu()), get the users choice (getChoice()), delete a person from the database (remove()), and a main method to test the features. There are also the UI methods addperson() (which gets the person info to add and calls the add() method), deletePerson() (which gets the name of the person to delete and calls the remove() method), and findPerson() (which gets the name of the person to find and calls the search() method). The method run() runs the UI methods. You will need to provide a search method (which is required by the remove() method), add a person to the database (add()) and displayAll() method to display the records. You will also need to add to findPerson() method your display code of the person found using the same format as displayAll() to display the single record. search(String name) - given the name of the person to find, returns the position of that entry in the address book (database) OR returns -1 indicating not found. add() - given a new person's data (name and phone number) adds it to the address book (database) displayAll() - display all the records in the address book (database) using the described format. Use a spacing of 20 chars for the name and 15 for the phone number and left justify it.
Expert Answer:
Related Book For
Posted Date:
Students also viewed these programming questions
-
answer the question clearly You are building a flight-control system for which a convincing safety case must be made. Would you assign the tasks of safety requirements engineering, test case...
-
Let A, B be sets. Define: (a) the Cartesian product (A B) (b) the set of relations R between A and B (c) the identity relation A on the set A [3 marks] Suppose S, T are relations between A and B, and...
-
What is the difference between MouseListener and MouseAdapter? [3 marks] (b) Via suitable HTML, the compiled version of the following Java code is presented to the appletviewer application: import...
-
Ebrahim Patel is a wholesaler who uses the periodic inventory system to account for inventory. Transactions for February: 1 Bought inventory from Rich Traders for R5 000 on credit. 2 Sold inventory...
-
The following hydrocarbon has an unusually large dipole moment. Explain how a large dipole moment might arise.
-
1) Explain the following paragraph in your own words. "A nation which has can produce at a lower cost when measured in terms of opportunity cost is said to have a comparative advantage. Even though...
-
The ABC Company has collected the following data concerning performance in its manufacturing plant: Required a. Prepare a traditional performance report (comparing actual to budget). Which processes...
-
Assume Nortel Networks contracted to provide a customer with Internet infrastructure for $2,000,000. The project began in 2011 and was completed in 2012. Data relating to the contract are summarized...
-
Create 3 specific problem about water reclamation...
-
Majer Corporation manufactures a product with the following standard costs: Standard Quantity or Hours Standard Price or Rate Standard cost per unit Direct materials 6.1 ounces ps 2.00 per ounce ps...
-
Ace Construction Company reported the following balance sheet and income statement data for the year ending December 31, 2025. Current assets $ 50,000 Net income $140,000 Current liabilities 22,000...
-
The following information is provided on a delivery invoice. Use this information to answer the following questions: Item Ordered Ground Beef 25 Pack 10 lb Weight (lb) 250 lb Unit Price Amount $2.30...
-
Two vectors, , and , are drawn on an coordinate system, as shown. Vector has a magnitude of 9.00 units, and vector has a magnitude of 5.00 units. Find the and of vectors and in the system. Compute...
-
_ _ _ is the collective action of a company's individuals and groups. Organizational behavior Taylorism Scientific management Company objective
-
Determine the effective annual yield for $1 invested for 1 year at 5.2% compounded semiannually. %. The effective annual yield is (Round to the nearest hundredth.)
-
Jensen Fences uses job order costing. Manufacturing overhead is charged to individual jobs through the use of a predetermined overhead rate based on direct labor costs. The following information...
-
Prepare a retained earnings statement for the year ending December 31, 2025.
-
What is taxable income, and what is the formula for determining taxable income?
-
Which of the following statements are true, and which are false? (a) n = 3 only if n-2n-3=0. (b) n 2n 3 0 only if n = 3. (c) If n 2n 3 = 0 then n = 3. (d) For integers a and b, ab is a square only if...
-
(a) Find \(a_{1}\). (b) Find \(a_{2}, a_{3}, \ldots, a_{9}\). (c) Find \(a_{100}\). (d) Investigate the sequence \(a_{1}, a_{2}, \ldots, a_{n}, \ldots\) further.
-
Oleander Corporation had total assets of \($1,200,000\) on 31 December 20X3. On 31 December 20X4, total assets had increased to \($1,400,000.\) Oleanders statement of changes in equity disclosed the...
Study smarter with the SolutionInn App