Create a program that will store results of your dice game

Assignment Help Basic Computer Science
Reference no: EM13308140

Create a program that will store the results of your dice game in a comma separated value file (filename.csv). You will use the Formatter API to construct a new file. Your file name will use the current-datetime for its name and each time your program runs, a new file will be created (i.e. 20130314.10:00:01-DieResults.csv). Once you have a file generated, you will populate it with the rolls of two die objects along with the roll number and date/time of each roll. Each round of your game must have a winner, so if the results of your die are equal, you must roll again. Your program will also output the die results to the screen.

 

  • Program implements Die Object
  • Program implements Player Object
  • Program accepts user input for counter controlled repetition or sentinel controlled repetition, which tracks number of rounds played for each game
  • Since each round must have a winner, your program will include an inner loop to check and re-cast die in case of a tie
  • Program imports Calendar to construct a proper datetime in the following format: MM/DD/yyyy HH:mm:ss
  • CSV file is named and generated correctly and can be opened in MS Excel
  • Outputs program authorship, including your RAM ID, Date and Course Number
  • You will also save your .csv file as an MS Excel file (hw4.xlsx) and analyze the results
    • Create a summary table and pie chart to showcase Player 1's vs. Player 2's win totals (see illustration below).

 

Sample CSV Output

Roll Number, Winner, Prof, Opp, DateTime

1,Prof,4,2,03/21/2013 09:15:24

2,Prof,2,1,03/21/2013 09:15:50

3,Opp,5,6,03/21/2013 09:16:14

4,Prof,3,1,03/21/2013 09:20:23

5,Opp,4,5,03/21/2013 09:21:03

6,Opp,5,6,03/21/2013 09:21:24

7,Prof,3,2,03/21/2013 09:21:54

 

Reference no: EM13308140

Questions Cloud

Find the magnitude force on each wire : Three parallel wire 5 m long carry each 24 A of current in the same direction. Find the magnitude force on each wire
Analysis of a health and safety accident : A case study analysis of a health and safety accident in the New Zealand workplace. The workplace should be related to your chosen discipline.
Calculate the deflection v and slope dv by dx as function : For a cantilever beam 20 ft long under a uniformly distributed load of 500 pounds/foot, calculate the deflection v and the slope dv/dx as a function of x by integrating differential equations.
What is the observed scattering angle : a monochromatic beam of x-rays with a wavelength of 0.280 nm is scattered by a metal foil. what is the observed scattering angle
Create a program that will store results of your dice game : Create a program that will store the results of your dice game in a comma separated value file (filename.csv). You will use the Formatter API to construct a new file.
Determine the angular velocity of bar ab at displacement : Slider A moves in the horizontal slot with a constant speed v = 1.90 m/s for a short interval of motion. Determine the angular velocity of bar AB if the displacement xA = 90 mm, and the length L = 440 mm.
Obtain the final temperature of the gas : A vertical heat-insulated cylinder is divided into two parts by a movable piston of mass m. Find the final temperature of the gas
Create a map that contains an individuals jnumber : Write a program that illustrates you knowledge of maps and files. Create a map that contains an individuals Jnumber and their names.
Compute the percent voids in total mix in mineral aggregate : The compacted specimen contains 6% asphalt binder by weight of total mix, and has a bulk density of 143.9 lb/ft^3. Ignoring absorption, compute the percent voids in total mix, percent voids in mineral aggregate

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Identifies the cost of computer

identifies the cost of computer components to configure a computer system (including all peripheral devices where needed) for use in one of the following four situations:

  Input devices

Compare how the gestures data is generated and represented for interpretation in each of the following input devices. In your comparison, consider the data formats (radio waves, electrical signal, sound, etc.), device drivers, operating systems suppo..

  Cores on computer systems

Assignment : Cores on Computer Systems:  Differentiate between multiprocessor systems and many-core systems in terms of power efficiency, cost benefit analysis, instructions processing efficiency, and packaging form factors.

  Prepare an annual budget in an excel spreadsheet

Prepare working solutions in Excel that will manage the annual budget

  Write a research paper in relation to a software design

Research paper in relation to a Software Design related topic

  Describe the forest, domain, ou, and trust configuration

Describe the forest, domain, OU, and trust configuration for Bluesky. Include a chart or diagram of the current configuration. Currently Bluesky has a single domain and default OU structure.

  Construct a truth table for the boolean expression

Construct a truth table for the Boolean expressions ABC + A'B'C' ABC + AB'C' + A'B'C' A(BC' + B'C)

  Evaluate the cost of materials

Evaluate the cost of materials

  The marie simulator

Depending on how comfortable you are with using the MARIE simulator after reading

  What is the main advantage of using master pages

What is the main advantage of using master pages. Explain the purpose and advantage of using styles.

  Describe the three fundamental models of distributed systems

Explain the two approaches to packet delivery by the network layer in Distributed Systems. Describe the three fundamental models of Distributed Systems

  Distinguish between caching and buffering

Distinguish between caching and buffering The failure model defines the ways in which failure may occur in order to provide an understanding of the effects of failure. Give one type of failure with a brief description of the failure

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd