Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In java Assume that the following information has been recorded about a group of people: name (last name, first name) age (integer) annual income (real)

In java

Assume that the following information has been recorded about a group of people:

name (last name, first name)

age (integer)

annual income (real)

a)Input the number of people in the group (n) and then input the information for each person, storing it in three parallel one-dimensional (1-D) arrays.

b)Write a method which given the three arrays, outputs the information in a formatted form, with suitable headings.

c)Compute and output the following statistics:

the average age

the average income

the name of the youngest person

the income of the oldest person

For each statistic, write a method which takes the necessary arrays(s) and returns the required result.

d)Using Selection Sort, sort the information into alphabetical order by last name. Output a formatted table, using the method from (b).

e)Using Insertion Sort, sort the information into ascending order by age. Output a formatted table, using the method from (b).

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_2

Step: 3

blur-text-image_3

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

Question

1. Identify and control your anxieties

Answered: 1 week ago