Answered step by step
Verified Expert Solution
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 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
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started