This is Java In this problem we will write a program that asks the user to enter...

60.1K

Verified Solution

Question

Programming

This is Java

In this problem we will write a program that asks the user toenter a) The user's first name and b) a series of integersseparated by commas. The integers may not include decimal pointsnor commas. The full string of numbers and commas will not includespaces either, just digits and commas. An example of valid inputstring is:       7,9,10,2,18,6

The string must be input by the user all at once; do not use aloop to read each number one at a time. The purpose of thisassignment is to learn to use the String methods. The program willcalculate and display the following data:

  • User name
  • Sum of all numbers in the string
  • A count of how many numbers were entered
  • Average of all the numbers in the string expressed to onedecimal place.

Answer & Explanation Solved by verified expert
4.4 Ratings (657 Votes)
Dear Student As per the requirement submitted above kindly find the belowsolutionHere a new java program with name Mainjavais created which contains following codeMainjavaimport javautilpublic class Main public static void mainString    See Answer
Get Answers to Unlimited Questions

Join us to gain access to millions of questions and expert answers. Enjoy exclusive benefits tailored just for you!

Membership Benefits:
  • Unlimited Question Access with detailed Answers
  • Zin AI - 3 Million Words
  • 10 Dall-E 3 Images
  • 20 Plot Generations
  • Conversation with Dialogue Memory
  • No Ads, Ever!
  • Access to Our Best AI Platform: Flex AI - Your personal assistant for all your inquiries!
Become a Member

Other questions asked by students