Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Given the problem statement below, complete the following: Procedural program that is organized into multiple methods and runs correctly (70 pts). In order to receive

image text in transcribed
image text in transcribed
Given the problem statement below, complete the following: Procedural program that is organized into multiple methods and runs correctly (70 pts). In order to receive credit, your code MUST run and complete at least some of the steps; comment out the code that shows your attempt but does not work Coding style and comments Coding style (meaningful identifiers, indentation, etc.) and the header with your name and course info at the top of the file (10 pts) Comments o o Javadocs for every method and class (10 points) Inline comments explaining code logic (10 points) Programs that are not procedural and/or do not use multiple methods or use global variables will not receive a grade higher than 40 pts all together, even if a program runs perfectly, and the documentation is correct and thorough. Extra credit: o Detailed algorithm written in English / pseudocode (10 pts) o Test plan (10 pts) You are NOT allowed to help one another with this program or use somebody else's code rules listed on the syllabus. However, you may seek help from CSS mentors or a TA or an instructor -check the Problem statement For this program, you are to write a simulation for the lottery game of Powerball.In the game of Powerball, 5 white balls are drawn from a drum of 59 white balls (numbered 1-59 without repetition) and 1 red ball out of a drum of 35 red balls (numbered 1-35). Players win by matching: (a) white ball numbers in any order and (b) the red ball number. Overall, there are 9 ways to win: Prize Grand Prize $1,000,000 $10,000 $100 $100 $7 $7 $4 $A Red Match 1 ball 0 balls 1 ball 0 balls 1 ball 0 balls 1 ball 1 ball 1 ball White Match 5 balls AND 5 balls AND 4 balls AND 4 balls AND 3 balls AND 3 balls AND 2 balls AND 1 ball AND O balls AND In your simulation you will first generate players lottery tickets/choices and then compare these choices to the actual winning combination to determine the winners and the overall game statistics, as described below. While solving this problem, you are to use a procedural approach in Java. Decompose your program into methods and use lists and strings, i.e. you are only to use data types covered in chapters 1-6 and chapter 10. Input You will be given two text files to read from. One file will contain player names and the other file will contain the winning combination. You are to ask the user to enter the names of these files. You may assume that both files will be text files

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Pro Database Migration To Azure Data Modernization For The Enterprise

Authors: Kevin Kline, Denis McDowell, Dustin Dorsey, Matt Gordon

1st Edition

1484282299, 978-1484282298

More Books

Students also viewed these Databases questions

Question

5. Wyeth Pharmaceuticals

Answered: 1 week ago