JAVA PPROGRAM ASAP Please create this program ASAP BECAUSE IT IS MY LAB ASSIGNMENT #2 so it passes all the test cases. The program must pass the test case when uploaded to Hypergrade. Chapter 9. PC #8. 8. Sum of Numbers in a String (page 610) Write a program that asks the user to enter a series of numbers separated by commas. Here are two examples of valid input: 7,9,10,2,18,6 8.777,10.9,11,2.2,-18,6 The program should calculate and display the sum of all the numbers. Input Validation 1. Make sure the string only contains numbers and commas (valid symbols are '0'-'9', '-', '.', and ','). 2. If the string is empty, a messages should be displayed, saying that the string is empty. Test Case 1 Enter a series of numbers separated only by commas or type QUIT to exit:\n 7,9,10,2,18,6ENTER The sum of those numbers is 52.00\n Enter a series of numbers separated only by commas or type QUIT to exit:\n ENTER Empty string.\n Enter a series of numbers separated only by commas or type QUIT to exit:\n 8.777,10.9,11,2.2,-18,6ENTER The sum of those numbers is 20.88\n Enter a series of numbers separated only by commas or type QUIT to exit:\n quitENTER Test Case 2 Enter a series of numbers separated only by commas or type QUIT to exit:\n invalid_input_hereENTER Invalid input.\n Enter a series of numbers separated only by commas or type QUIT to exit:\n 1,2,3ENTER The sum of those numbers is 6.00\n Enter a series of numbers separated only by commas or type QUIT to exit:\n quitENTER
JAVA PPROGRAM ASAP Please create this program ASAP BECAUSE IT IS MY LAB ASSIGNMENT #2 so it passes all the test cases. The program must pass the test case when uploaded to Hypergrade. Chapter 9. PC #8. 8. Sum of Numbers in a String (page 610) Write a program that asks the user to enter a series of numbers separated by commas. Here are two examples of valid input: 7,9,10,2,18,6 8.777,10.9,11,2.2,-18,6 The program should calculate and display the sum of all the numbers. Input Validation 1. Make sure the string only contains numbers and commas (valid symbols are '0'-'9', '-', '.', and ','). 2. If the string is empty, a messages should be displayed, saying that the string is empty. Test Case 1 Enter a series of numbers separated only by commas or type QUIT to exit:\n 7,9,10,2,18,6ENTER The sum of those numbers is 52.00\n Enter a series of numbers separated only by commas or type QUIT to exit:\n ENTER Empty string.\n Enter a series of numbers separated only by commas or type QUIT to exit:\n 8.777,10.9,11,2.2,-18,6ENTER The sum of those numbers is 20.88\n Enter a series of numbers separated only by commas or type QUIT to exit:\n quitENTER Test Case 2 Enter a series of numbers separated only by commas or type QUIT to exit:\n invalid_input_hereENTER Invalid input.\n Enter a series of numbers separated only by commas or type QUIT to exit:\n 1,2,3ENTER The sum of those numbers is 6.00\n Enter a series of numbers separated only by commas or type QUIT to exit:\n quitENTER
Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
Related questions
Question
JAVA PPROGRAM ASAP
Please create this program ASAP BECAUSE IT IS MY LAB ASSIGNMENT #2 so it passes all the test cases. The program must pass the test case when uploaded to Hypergrade.
Chapter 9. PC #8. 8. Sum of Numbers in a String (page 610)
Write a program that asks the user to enter a series of numbers separated by commas. Here are two examples of valid input:
7,9,10,2,18,6
8.777,10.9,11,2.2,-18,6
The program should calculate and display the sum of all the numbers.
Input Validation
1. Make sure the string only contains numbers and commas (valid symbols are '0'-'9', '-', '.', and ',').
2. If the string is empty, a messages should be displayed, saying that the string is empty.
Test Case 1
Enter a series of numbers separated only by commas or type QUIT to exit:\n
7,9,10,2,18,6ENTER
The sum of those numbers is 52.00\n
Enter a series of numbers separated only by commas or type QUIT to exit:\n
ENTER
Empty string.\n
Enter a series of numbers separated only by commas or type QUIT to exit:\n
8.777,10.9,11,2.2,-18,6ENTER
The sum of those numbers is 20.88\n
Enter a series of numbers separated only by commas or type QUIT to exit:\n
quitENTER
7,9,10,2,18,6ENTER
The sum of those numbers is 52.00\n
Enter a series of numbers separated only by commas or type QUIT to exit:\n
ENTER
Empty string.\n
Enter a series of numbers separated only by commas or type QUIT to exit:\n
8.777,10.9,11,2.2,-18,6ENTER
The sum of those numbers is 20.88\n
Enter a series of numbers separated only by commas or type QUIT to exit:\n
quitENTER
Test Case 2
Enter a series of numbers separated only by commas or type QUIT to exit:\n
invalid_input_hereENTER
Invalid input.\n
Enter a series of numbers separated only by commas or type QUIT to exit:\n
1,2,3ENTER
The sum of those numbers is 6.00\n
Enter a series of numbers separated only by commas or type QUIT to exit:\n
quitENTER
invalid_input_hereENTER
Invalid input.\n
Enter a series of numbers separated only by commas or type QUIT to exit:\n
1,2,3ENTER
The sum of those numbers is 6.00\n
Enter a series of numbers separated only by commas or type QUIT to exit:\n
quitENTER
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 4 steps with 3 images
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Recommended textbooks for you
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education