Pokercards sorted c language | Computer Science homework help

(30 points)

 

Program details

 

When playing poker and other card games (standard 52 cards, excluding the jokers), it is usual to arrange a hand to reflect its values. Write a program in C that arranges and prints out a random hand of ten cards in sorted order by pips values. Assume that an ace is highest in value, a king is next highest, which is followed by a queen, a jack, and so forth. For cards of the same pips values, use their suits to sort them in the order of Clubs, Diamonds, Hearts, and Spades. Notice that no card shows more than once in a hand.

 

In order for the hands of cards dealt by the program to be truly random, have the following line at the beginning of your program: (You need #include <time.h> though.)

 

            srand(time(NULL));

 

The following screen shot contains two sample outputs of the program.

 

 

You may use ch7/test_drive.c as your reference to use a “comparator” function and qsort() to sort your cards.

 

Although it is totally up to you how you design your program, it needs to satisfy the following rules:

 

          It consists of at least 3 source files (.c files) and at least 3 header files (.h files).

          It uses structures (and optionally unions and enums) to model poker cards.

          It is organized in the following way:

o   bin_files/ : a subfolder that holds executable file(s)

o   obj_files/ : a subfolder that holds object file(s)

o   inc_files/ : a subfolder that holds header file(s)

o   src_files/ : a subfolder that holds source file(s)

 

          It comes with a workable makefile.

 

 







Calculate Your Essay Price
(550 words)

Approximate price: $22

Calculate the price of your order

550 words
We'll send you the first draft for approval by September 11, 2018 at 10:52 AM
Total price:
$26
The price is based on these factors:
Academic level
Number of pages
Urgency
Basic features
  • Free title page and bibliography
  • Unlimited revisions
  • Plagiarism-free guarantee
  • Money-back guarantee
  • 24/7 support
On-demand options
  • Writer’s samples
  • Part-by-part delivery
  • Overnight delivery
  • Copies of used sources
  • Expert Proofreading
Paper format
  • 275 words per page
  • 12 pt Arial/Times New Roman
  • Double line spacing
  • Any citation style (APA, MLA, Chicago/Turabian, Harvard)

Our guarantees

Delivering a high-quality product at a reasonable price is not enough anymore.
That’s why we have developed 5 beneficial guarantees that will make your experience with our service enjoyable, easy, and safe.

Money-back guarantee

You have to be 100% sure of the quality of your product to give a money-back guarantee. This describes us perfectly. Make sure that this guarantee is totally transparent.

Read more

Zero-plagiarism guarantee

Each paper is composed from scratch, according to your instructions. It is then checked by our plagiarism-detection software. There is no gap where plagiarism could squeeze in.

Read more

Free-revision policy

Thanks to our free revisions, there is no way for you to be unsatisfied. We will work on your paper until you are completely happy with the result.

Read more

Privacy policy

Your email is safe, as we store it according to international data protection rules. Your bank details are secure, as we use only reliable payment systems.

Read more

Fair-cooperation guarantee

By sending us your money, you buy the service we provide. Check out our terms and conditions if you prefer business talks to be laid out in official language.

Read more

Order your essay today and save 10% with the coupon code: best10