ComputerScienceExpert

(11)

$18/per page/

About ComputerScienceExpert

Levels Tought:
Elementary,Middle School,High School,College,University,PHD

Expertise:
Applied Sciences,Calculus See all
Applied Sciences,Calculus,Chemistry,Computer Science,Environmental science,Information Systems,Science Hide all
Teaching Since: Apr 2017
Last Sign in: 103 Weeks Ago, 3 Days Ago
Questions Answered: 4870
Tutorials Posted: 4863

Education

  • MBA IT, Mater in Science and Technology
    Devry
    Jul-1996 - Jul-2000

Experience

  • Professor
    Devry University
    Mar-2010 - Oct-2016

Category > Programming Posted 04 May 2017 My Price 8.00

CardGameWithRobbie

Need this solved

....  please follow instructions

 

i need this done by using Netbeans java.

 

 

CS 1110 Spring 2017 LA2 Lab Assignment 2 “CardGameWithRobbie” app Due (February 8, 2017- 11:59 pm) “CardGameWithRobbie” app (100 points) Objectives – learn/practice the following new concepts: use preexisting programs as models for how to carry out certain concepts
use if’s, if/else’s, conditions, while loops, switch’s, as appropriate
data validation
use a pre-existing method and call it
printf’s, where possible rather than relying on just print & println
running totals & counters STANDARD REQUIREMENTS A top comment including your name, lab section day/time, asgn number & name of application
Appropriate descriptive variable naming, including use of camel case (and variables start with a small
letter) incremental development
follow these written specs (and other things specified by your lab instructor)
output goes to the console (which follows these written specs in terms of formatting, etc.) indent/align program code to show program logic (SUGGESTION: use NetBeans’ dropDown menu
Source, then choose Format) do not type beyond the red line in NetBeans PROJECT OVERVIEW
This app simulates a card game, pitting a human interactive player (the user) against “Robbie” (the software
program). Only cards ace (1) through 9 are used to simplify things. One game consists of as many rounds as the
human player wants – which will always be at least 1 round. At the end of each round the user must specify to do
another round, or not. For each round, there are rules (see below) to determine how many points each player’s
hand-of-5-cards gets. Then a determination is made as to who won that round – and how many game points are
awarded to that player. [Note, for very young players, aged 8 or less, 5 bonus are given to the user before
determining the winner of the round and the point-spread]. Summary details are printed for each round. Totals
are also kept for the whole game to summarize how many games each player won and their total points – and
those are printed at the end.
Because there is human input, some data validation is done on the user input.
There are 2 types of “points:
1)
2) points for a particular hand-of-5-cards
(this is where young player’s 5 bonus points comes in)
game points for winning/tie-ing a round CS 1110 Spring 2017 LA2 “CardGameWithRobbie” app RULES FOR GETTING POINTS (for a hand-of-5-cards)
1)
2)
3)
4)
5)
6)
7)
8) total of the 5 cards is more than 25
total of the 5 cards is an even number
at least 1 of the cards is a lucky 7
first card or last card is a 9 or an 8
first card and last card are both 9 or both 8
middle card is > 5
middle card is > 8
first card is <= 2nd card >> 2 points
>> 2 points
>> 1 point
>> 2 point
>> 3 points
>> 3 points
>> 3 points
>> 2 points RULES FOR GETTING GAME POINTS (when comparing Robbie’s points to other player’s points for a particular round) for young players, add their 5 bonus points before deciding on game points for a particular round
for a tie – both players get 5 game points
for non-ties, the player with the larger number of points (for this round) gets the game points
more points by a small margin (i.e., 1-5 points), the higher one gets 10 game points
more points by a big margin
(i.e., 6-10 points), the higher one gets 20 game points
more points by a huge margin (i.e., 11+ points), the higher one gets 25 game points
USER INPUT DATA (from dialog boxes) user’s first name (so interaction is friendlier – used in both the rest of the input dialog boxes & the console
output)
user’s age (must be a number between 4 and 99)
a 5-digit number which simulates the 5 cards for the user (must be a 5-digit number and it must not contain any
0’s)
want to do another round? Yes or No (also allow yes, YES, y, Y, no, NO, n, N – and if it isn’t any of these, the
default is No) ROBBIE’s hand of 5 cards for a round
Call the getNum method, which returns a 5-digit number.
See the example on Thursday’s website to get the code for that method (to put in your program) and see how to call it. CS 1110 Spring 2017 LA2 “CardGameWithRobbie” app OUTPUT REPORT (to Console/Output window) – a sample
[IMPORTANT: the POINTS DATA VALUES below are NOT accurate based on the given rules
– the display below is just to show the required output/format] Hey Thomas – I’m Robbie - welcome to the game You deserve 5 bonus points for each round since you’re 7 years old Let’s start the game
----------------------------------------Round 1
Thomas’s cards: 1 4 2 6 7 –->> that’s 10 points (plus your 5 bonus points) Robbie’s cards: 9 2 6 1 4 –->> that’s 11 points :-) Thomas won this round (by a small margin)
>>> 10 game points for Thomas OK, you want to do ANOTHER ROUND. . .
----------------------------------------Round 2
Thomas’s cards: 1 2 3 4 5 –->> that’s 7 points (plus your 5 bonus points) Robbie’s cards: 5 6 7 8 9 –->> that’s 18 points :-( Robbie won this round (by a big margin)
>>> 20 game points for Robbie OK, you want to do ANOTHER ROUND. . .
----------------------------------------- CS 1110 Spring 2017 LA2 “CardGameWithRobbie” app Round 3
Thomas’s cards: 9 9 8 7 6 –->> that’s 10 points (plus your 5 bonus points) Robbie’s cards: 2 0 6 1 9 –->> that’s 15 points :-| It’s a tie
>>> 5 game points for both players OK, you are DONE WITH THE GAME
----------------------------------------- GAME TOTALS:
Thomas: 15 game points – 1 win, 1 lost, 1 tie Robbie: 25 game points – 1 win, 1 lost, 1 tie OVERALL WINNER: Robbie CS 1110 Spring 2017 LA2 “CardGameWithRobbie” app APPENDIX A Incremental Development
There are several ways/styles to write a program. The incremental build model is a method of software
development where the product is designed, implemented and tested incrementally (a little more is added each
time) until the product is finished. It involves both development and maintenance (Wikipedia!). i.e., “always
keeping the program in a working state (which produces SOME output”
1.
2.
3.
4. Write some code to carry out a step in the algorithm
“Compile” (Build) it and correct all syntax errors
Run program to check thatoutput is correct thus far
Repeat steps 1,2,3 Implementation Phase
Write Java code to implement your design. Assignment Submission Your project folder should be named la2cs1110_yourlastnameFirstInitial_mmddyy, Replace
“yourlastnameFirstInitial” and “mmddyy” appropriately.
Generate a .zip file that contains all of your files in the above java project folder.
Submit the .zip file via E-learning

Answers

(11)
Status NEW Posted 04 May 2017 01:05 AM My Price 8.00

-----------

Attachments

file 1493862251-Solutions file 2.docx preview (51 words )
H-----------ell-----------o S-----------ir/-----------Mad-----------am ----------- Th-----------ank----------- yo-----------u f-----------or -----------you-----------r i-----------nte-----------res-----------t a-----------nd -----------buy-----------ing----------- my----------- po-----------ste-----------d s-----------olu-----------tio-----------n. -----------Ple-----------ase----------- pi-----------ng -----------me -----------on -----------cha-----------t I----------- am----------- on-----------lin-----------e o-----------r i-----------nbo-----------x m-----------e a----------- me-----------ssa-----------ge -----------I w-----------ill----------- be----------- qu-----------ick-----------ly -----------onl-----------ine----------- an-----------d g-----------ive----------- yo-----------u e-----------xac-----------t f-----------ile----------- an-----------d t-----------he -----------sam-----------e f-----------ile----------- is----------- al-----------so -----------sen-----------t t-----------o y-----------our----------- em-----------ail----------- th-----------at -----------is -----------reg-----------ist-----------ere-----------d o-----------n -----------THI-----------S W-----------EBS-----------ITE-----------. ----------- Th-----------ank----------- yo-----------u -----------
Not Rated(0)