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

  Indicates that the student id is abc54301

Indicates that the student ID is ABC54301 and the answer to question 1 is  True, the answer to question 2 is False, and so on. This student did not  answer question 9. The exam has 20 questions, and the class has more than  150 students. Each corre..

  Technology someday eliminate need for antenna maintenance

What technology may someday eliminate this need for antenna maintenance? In your own words, briefly describe how this technology works.

  What uid and pid have the highest amount of physical memory

What UID and PID have the highest amount of physical memory a process has used and is not swapped out? Show all processes and full output.

  Explain one technological device

Explain one technological device in 350 to 700 words. Include the following:When did it come (or will it potentially come) into existence? What scientific or technological reasoning explains how this potential will be (or can be) be reached in t..

  Returns the bottom of the stack instead of the top

This function returns the bottom of the Stack instead of the top

  Risk identification

You have been assigned as the manager on a project to develop a new application system for your business partner. You were given two weeks to develop a project plan and high level cost estimates.

  Explaining components of computing environment

According to Raggad's taxonomy of information security, a computing environment is made up of ?ve continuously interacting components namely; activities, people, data, technology and networks.

  How recursion breaks up complex computational problems

Discuss how recursion breaks up complex computational problems into simpler ones. Identify three problems that would be difficult to solve without the use of recursion. Justify your response in simple C++ syntax.

  In-house development and packaged solution for r-way system

Should R/Way's new system be based on file-server or client/server architecture? Why? What would be the pros and cons of selecting in-house development versus a packaged solution for the R/Way system?

  Write command to determine users on active directory from xp

Write down the command to determine all users on Active Directory from XP. Write down the query to look up a user on Active Directoy and see the user's property.

  What is the global cpi for each implementation?

Given a program with a dynamic instruction count of 1.0E6 instructions divided into classes as follows: 10% class A, 20% class B, 50% class C, and 20% class D, which implementation is faster?"

  Provide a recursive definition of sequence s

provide a recursive definition of sequence S of all Binary strings starting with 1. Include the base case, recursion and restriction.

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