Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Create a program called AverageFamilyAgeYourLastName.java . In this project, prompt the user for how many ages they would like to enter. Prompt the user for

Create a program called AverageFamilyAgeYourLastName.java. In this project, prompt the user for how many ages they would like to enter.

Prompt the user for the name and age for each person.

After all the names and ages have been collected, return the average age as a double and return the oldest person's name. Here are two sample run:

image text in transcribed

image text in transcribed

Note: do not use arrays, lists, sets or maps to implement this project.

This project is worth 15 points.

How many family members: 5 Enter a family member's name: Dad Enter Dad's age: 77 Enter a family member's name: Mom Enter Mom's age: 75 Enter a family member's name: Susan Enter Susan's age: 44 Enter a family member's name: Billy Enter Billy's age: 42 Enter a family member's name: Frank Enter Frank's age: 40 The average age in the family is: 55.6 Dad is the oldest member of the family. How many family members: 3 Enter a family member's name: Monica Enter Monica's age: 32 Enter a family member's name: Rachel Enter Rachel's age: 35 Enter a family member's name: Phoebe Enter Phoebe's age: 34 The average age in the family is: 33.666666666666664 Rachel is the oldest member of the family

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

Question

What is DDL?

Answered: 1 week ago