Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

please help me with this java code, i am stuck.. show the source code as well as ***screenshots of input and output in intellij ****only.

please help me with this java code, i am stuck.. show the source code as well as ***screenshots of input and output in intellij ****only. please read instructions this is my 3rd time asking. i keep getting it wrong.

image text in transcribed
Hw5:Sorting Create a program that generates your friend contact list . Define a class name Contact with implements Comparable interface Define three properties firstName, lastName, phone as assign proper data type . Define a construct and initialize all three properties Create a toString override method that will return lastname + firstname + phone Create two getter methods (getFirstName and getLastName) . Override the compareTo(object obj) method and implement the logic to compare firstname and lastName . Create a selectionSort method takes (Comparable)as an arguments and sort the list of Contact object . On Main . Create a Contact array object for eg Contact friend= new Contact[5] . Create 5 contacts array with firstname, lastname and phonenumber . Call the SelectionSort method and pass the list of contact as a parameter . Loop through the contact and print the result. . SAMPLE OUTPUT "C:\\Program Files (x86) \\Java\\jdk1.8.0 92\\bin\\java" ... Baners, Sarah 123-785-4752 Getz, Laura 675-343-2321 Phelps, Frank 675-343-2321 Riley, Mark 675-343-2321 Smith, John 456-232-4567 Smith, Larry 675-343-2321 Process finished with exit code 0

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

Financial management theory and practice

Authors: Eugene F. Brigham and Michael C. Ehrhardt

12th Edition

978-0030243998, 30243998, 324422695, 978-0324422696

Students also viewed these Programming questions

Question

Explore the idea behind the competitive triangle.

Answered: 1 week ago

Question

The structure of DNA was first discovered by.........

Answered: 1 week ago

Question

The three components of a nucleotide are....... and........?

Answered: 1 week ago

Question

Primary function of root ?

Answered: 1 week ago

Question

The only phyto hormone which is a gas at ordinary temperature?

Answered: 1 week ago