Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Create a new Java class called AverageWeight. Create two arrays: an array to hold 3 different names and an array to hold their weights. Use

Create a new Java class called AverageWeight.
Create two arrays:
an array to hold 3 different names and an array to hold their weights.
Use Scanner to prompt for their name and weight and store in correct array.
Compute and print the average of the weights entered using printf command.
Use a loop to traverse and print the elements of each array or use Arrays class method to print.
I want the coding as java

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

Microsoft Visual Basic 2008 Comprehensive Concepts And Techniques

Authors: Gary B. Shelly, Corinne Hoisington

1st Edition

1423927168, 978-1423927167

More Books

Students also viewed these Databases questions