Create a java program that will accept an integer and character. If the user input 'A',...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Create a java program that will accept an integer and character. If the user input 'A', compute and display the sum of 10 integers else display "Invalid Character". run: Enter a letter: a Enter a number: 1 run: Enter a letter: A Enter a number: 5 Enter a number: 2 Enter a number: 6 Enter a number: 3 Enter a number: 9 Enter a number: 4 Sample output: run: Enter a number: 5 Enter a number: 6 Enter a number: 7 Enter a number: 8 Enter a number: 9 Enter a number: 10. The sum of 10 integer is: 55 BUILD SUCCESSFUL (total time: 11 seconds) Enter a letter: Invalid Character! Enter a number: 1 Enter a number: 2 Enter a number: 7 Enter a number: 11 Enter a number: 18 Enter a number: 52 Enter a number: ho The sum of 10 integer is: 121 BUILD SUCCESSFUL (total time: 15 seconds) BUILD SUCCESSFUL (total time: 7 seconds) Activate Windows Go to Settings to activate Create a java program that will accept an integer and character. If the user input 'A', compute and display the sum of 10 integers else display "Invalid Character". run: Enter a letter: a Enter a number: 1 run: Enter a letter: A Enter a number: 5 Enter a number: 2 Enter a number: 6 Enter a number: 3 Enter a number: 9 Enter a number: 4 Sample output: run: Enter a number: 5 Enter a number: 6 Enter a number: 7 Enter a number: 8 Enter a number: 9 Enter a number: 10. The sum of 10 integer is: 55 BUILD SUCCESSFUL (total time: 11 seconds) Enter a letter: Invalid Character! Enter a number: 1 Enter a number: 2 Enter a number: 7 Enter a number: 11 Enter a number: 18 Enter a number: 52 Enter a number: ho The sum of 10 integer is: 121 BUILD SUCCESSFUL (total time: 15 seconds) BUILD SUCCESSFUL (total time: 7 seconds) Activate Windows Go to Settings to activate
Expert Answer:
Related Book For
Introduction to Java Programming, Comprehensive Version
ISBN: 978-0133761313
10th Edition
Authors: Y. Daniel Liang
Posted Date:
Students also viewed these programming questions
-
Unit Cost Analysis Crown Trophies Inc. uses a job order cost system for determining the cost to manufacture award products ( plaques and trophies ) . Among the company's products is an engraved...
-
Could you please help complete the following java code. Help is needed where //*** is throughout the code. import java.util.Arrays; import java.util.Random; import java.util.Scanner; // // Project 3...
-
Need help getting the solution to this java code. Need help where //*** is marked throughout the code. Thanks! import java.util.Arrays; import java.util.Random; import java.util.Scanner; public class...
-
The monochromatic emissivity of a diffuse-surface at 1600 K varies with wavelength in the following manner : = 0.4 for 0
-
List and briefly define the major types of OS scheduling.
-
Received freight bill 26245 (Document No. 19) from Interstate Motor Freight for the Velocity Sporting Goods shipment received on December 20th. Issued check (Doc. No. 20) to Interstate Motor Freight...
-
The Miller Company purchased a new headquarters building on January 1 at a comme cost of \($40\) million. The building is expected to last 20 years, at which time its residual value is expected to be...
-
At December 31, 2012, Landy Products has cash of $12,000, receivables of $8,000, and inventory of $44,000. The companys equipment totals $88,000. Landy owes accounts payable of $13,000 and long-term...
-
provide a company overview for Google company then present compensation philosophy for it do fast and need correct answer with good explanation ** need correct answer ** no plagrism
-
Refer the following table. Focus Metals Inc. Comparative Balance Sheet Information: November 30 (millions of $) 2020 Cash 16 86 Accounts receivable (net). 386 232 60 53 Inventory Plant and equipment...
-
(1) Evaluate the following integrals. Simplify each of these and give answer as fraction form or with powers of "e". Just plugging in numbers will cause you to lose points. 141 t a) [^ (^ (^" + y)...
-
Find the area under the curve y = 1x-2 from 9 to at and evaluate it for t=10, t = 100. Then find the total area under this curve for x 9. (a) t = 10 1 90 0 (b) t=100 91 900 (c) Total area 101 900
-
Next, you talk to Gabriela, manager of the plant in Brazil. She objects to the CEO's decision to enforce restrictions on regular celebrations. Retirement parties have been cut from a monthly to a...
-
a.)List and critique the assumptions of the Black-Scholes model. (5 Marks) b.)Give a summary on how overconfidence and "snakebite" effect could influence portfolio performance in a Securities...
-
19. Yearly, students are invited to membership in the honor society for your major if their class rank is at least in the 90th percentile for all students in that major. In 2019 you ranked 23 out of...
-
Your organization has achieved success after implementing the control process in question four and now the CEO of the organization wants to expand the company infrastructure by opening another...
-
A company looking to raise funds has decided to issue 15-year zero-coupon bonds. The bonds will have a $1,000 face value and the required return is 5%. What amount will these bonds sell for when...
-
Currently, there are five concepts of food stands, including: hot dogs, soft pretzels, turkey legs, sandwich wraps, and funnel cakes. This approach will double the existing number of food stands...
-
The Forrester Company's income statement and comparative balance sheets as of December 31 of 2019 and 2018 are shown below: Cash dividends of \(\$ 31,000\) were declared and paid during 2019. Plant...
-
The Geary Company's income statement and comparative balance sheets as of December 31 of 2019 and 2018 follow: During the year, the following transactions occurred: 1. Sold equipment for \(\$ 9,000\)...
-
Meagan Enterprises reported the following information for the past year of operations: For each transaction, indicate whether the ratio will (I) increase, (D) decrease, or (N) have no effect....
Study smarter with the SolutionInn App