Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

public class Driver { public static void main(String[] args) throws IOException { DictionaryInterface phoneList = new SortedArrayDictionary (); // Amy Young's phone number is 513-523-5123.

public class Driver {

public static void main(String[] args) throws IOException {

DictionaryInterface phoneList = new SortedArrayDictionary<>();

// Amy Young's phone number is 513-523-5123. Add her to the phoneList. What does

// the method return, and why?

// 10 Points

System.out.println(phoneList.add(new Name("Amy", "Young"), "513-523-5123"));

// Steve Buscemi's phone number is 814-454-3695 Add him to the phoneList.

// 5 Points

System.out.println(phoneList.add(new Name("Steve", "Buscemi"), "814-454-3695"));

// How do you look up Amy's phone number?

// 5 Points

System.out.println(phoneList.getValue(new Name("Amy", "Young")));

// Use the add() method to change Amy's phone number. What does the method return?

// 10 Points

System.out.println(phoneList.add(new Name("Amy", "Young"), "513-654-8976"));

// How do you remove Steve from the phoneList?

// 5 Points

System.out.println(phoneList.remove(new Name("Steve", "Buscemi")));

// How do you remove everyone from the phoneList?

// 5 Points

System.out.println(phoneList.getSize());

phoneList.clear();

System.out.println(phoneList.getSize());

// TODO #3: phonedata.txt contains 100 lines of phone data. Add all of them to the

// phonebook.

// 30 Points

}

}

Sophia Smith 248-101-6172

Emma Johnson 726-215-4599

Olivia Williams 422-731-4325

Ava Jones 569-675-1789

Mia Brown 492-747-9015

Isabella Davis 397-224-1682

Riley Miller 762-863-5775

Aria Wilson 718-641-6695

Zoe Moore 390-806-3376

Charlotte Taylor 902-165-2907

Lily Anderson 653-905-8676

Layla Thomas 476-614-7850

Amelia Jackson 957-926-4442

Emily White 332-836-4943

Madelyn Harris 253-426-7647

Aubrey Martin 519-658-8307

Adalyn Thompson 656-214-4040

Madison Garcia 967-379-9941

Chloe Martinez 278-796-2217

Dylan Patterson 808-790-4869

Abigail Clark 910-317-2804

Aaliyah Rodriguez 471-177-2694

Avery Lewis 212-325-7163

Evelyn Lee 706-414-5927

Kaylee Walker 832-302-4021

Ella Hall 517-598-1251

Ellie Allen 352-402-4017

Scarlett Young 691-171-2405

Arianna Hernandez 452-905-8655

Hailey King 691-216-7104

Nora Wright 442-714-5956

Addison Lopez 260-995-1396

Brooklyn Hill 321-743-3836

Hannah Scott 860-349-5992

Mila Green 956-447-9249

Leah Adams 828-193-2988

Elizabeth Baker 699-889-2981

Sarah Gonzalez 675-235-2825

Eliana Nelson 618-149-4042

Mackenzie Carter 934-544-8086

Peyton Mitchell 530-247-6810

Maria Perez 965-123-9713

Grace Roberts 724-207-2118

Adeline Turner 420-139-6496

Elena Phillips 423-850-4268

Anna Campbell 271-203-6849

Victoria Parker 699-375-9426

Camilla Evans 986-493-5740

Lillian Edwards 413-291-2911

Natalie Collins 695-562-2071

Jackson Stewart 282-838-8829

Aiden Sanchez 366-344-6401

Lucas Morris 405-673-5277

Liam Rogers 728-214-8463

Noah Reed 475-485-3634

Ethan Cook 235-412-4900

Mason Morgan 675-114-8893

Caden Bell 515-332-9275

Oliver Murphy 878-436-5164

Elijah Bailey 424-924-4958

Grayson Rivera 930-463-5053

Jacob Cooper 824-401-3594

Michael Richardson 669-955-7735

Benjamin Cox 278-756-9057

Carter Howard 619-851-3189

James Ward 477-800-6654

Jayden Torres 716-529-2080

Logan Peterson 259-149-5483

Alexander Gray 916-941-2411

Caleb Ramirez 236-538-2229

Ryan James 315-494-4500

Luke Watson 434-641-2706

Daniel Brooks 930-899-5085

Jack Kelly 669-657-8959

William Sanders 401-783-3902

Owen Price 330-387-4326

Gabriel Bennett 238-832-5984

Matthew Wood 629-586-5427

Connor Barnes 350-383-7921

Jayce Ross 446-511-6783

Isaac Henderson 679-830-7751

Sebastian Coleman 816-720-7095

Henry Jenkins 692-270-6970

Muhammad Perry 336-116-7372

Cameron Powell 756-674-2604

Wyatt Long 668-947-3966

Dylan Patterson 646-581-4636

Nathan Hughes 644-870-5207

Nicholas Flores 692-410-1314

Julian Washington 823-742-8908

Eli Butler 411-512-4422

Olivia Williams 223-155-9217

Isaiah Foster 910-203-5800

Landon Gonzales 231-533-8439

David Bryant 801-914-9584

Christian Alexander 764-191-1797

Andrew Russell 358-172-4438

Brayden Griffin 331-799-8282

John Diaz 965-330-9419

Lincoln Hayes 289-368-8754

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered 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

Students also viewed these Databases questions