Question 1. A charity foundation holds yearly meetings for the public to donate money through sharing in a lottery. As a

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

Question 1. A charity foundation holds yearly meetings for the public to donate money through sharing in a lottery. As a

Post by answerhappygod »

Question 1 A Charity Foundation Holds Yearly Meetings For The Public To Donate Money Through Sharing In A Lottery As A 1
Question 1 A Charity Foundation Holds Yearly Meetings For The Public To Donate Money Through Sharing In A Lottery As A 1 (283.74 KiB) Viewed 19 times
in JAVA pls With comments
Question 1. A charity foundation holds yearly meetings for the public to donate money through sharing in a lottery. As a software engineer you were asked to develop a Java program for the charity foundation that works as follows: The Java program prompts the user to input his/her name as a string. The program prompts the user to enter a two-digit integer The program generates the WINING number which is composed of randomly generated two- digit number The user wins the lottery based on the following rules: a) If the user input matches the WINING number in exact order, the award is $1,000. b) If the two digits in the user input match the two digits in the lottery, the award is $500. c) If one digit in the user input matches a digit in the lottery, the award is $100. The following are samples of screen shots to illustrate the expected behavior of your program. Your program must display the same information with the same format. And should work for any valid user entered data. Welcome to the charity Lottery Enter your name: Sarah Pick a two-digit number: 42 The lottery number is 42 Congratulations! Sarah you win $1000 Welcome to the charity Lottery Enter your name: Steve Pick a two-digit number: 45 The lottery number is 49 Congratulations! Steve you win $100 Welcome to the charity Lottery Enter your name: Maria Pick a two-digit number: 27 The lottery number is 65 Sorry! Maria Good luck next time
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply