SophiaPretty

(5)

$14/per page/Negotiable

About SophiaPretty

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

Expertise:
Accounting,Algebra See all
Accounting,Algebra,Applied Sciences,Architecture and Design,Art & Design,Biology,Business & Finance,Calculus,Chemistry,Communications,Computer Science,Economics,Engineering,English,Environmental science,Essay writing Hide all
Teaching Since: Jul 2017
Last Sign in: 304 Weeks Ago, 4 Days Ago
Questions Answered: 15833
Tutorials Posted: 15827

Education

  • MBA,PHD, Juris Doctor
    Strayer,Devery,Harvard University
    Mar-1995 - Mar-2002

Experience

  • Manager Planning
    WalMart
    Mar-2001 - Feb-2009

Category > Computer Science Posted 31 Oct 2017 My Price 10.00

Open the project named chi l_ex4_CardDeck in the ex_starts directory.

I am having doing this one. An example of how its done would be great. Its for netbeans. The instructions are attached in a word document and the netbeans code that is to be edited is attached also.

 

In this exercise, you’ll write an application that uses a variety of arrays and for loops

to work with a deck of cards. If you can complete this exercise, you can be sure that

you have a solid grasp of the skills presented in this chapter.

 

1. Open the project named chi l_ex4_CardDeck in the ex_starts directory. Then, open the CardDeckApp class.

2. Create an array whose elements hold the first initial of the four different suits in a card deck. Declare another array that can hold a representation of the cards in a deck of cards without jokers. Both of these arrays should be declared at the class level so they can be accessed by all the methods you’ll add to this project.

3. Write a method to load the card array, one suit at a time. (Use the numbers 11, 12, and 13 to represent Jacks, Queens, and Kings respectively, and use the number 1 to represent Aces.) Write another method to print the cards in the array. Print each suit on a separate line by processing the cards array in 4 groups of 13 cards each. Separate the cards in each suit by a space. Call these two methods from the main method. Test the application to be sure the array is loaded and printed properly.

4. Write a method that shuffles the deck of cards. To do that, this method should get a number between 1 and 51 by multiplying the result of the random function by 50, converting it to an integer, and adding 1. Then, it should switch each card in the deck with the card that is the given number of cards after it (if there is one). This should be repeated 100 times to shuffle the deck thoroughly. Call this method from the main method, followed by the method that prints the cards array. Test the application to be sure that the cards are shuffled.

5. Declare a rectangular array at the class level that represents fours hands of cards with five cards each. Write a method that loads this array by dealing cards from the cards array. Be sure to deal one card at a time to each hand. Write a method that prints the hands, separating the cards in each hand by a space and printing each hand on a separate line. Test the application to be sure that the cards are dealt properly.

Attachments:

Answers

(5)
Status NEW Posted 31 Oct 2017 02:10 PM My Price 10.00

-----------  ----------- 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

Not Rated(0)