COMP1040: Programming Fundamentals - Internet Games Company - IT Assignment Help

Download Solution Order New Solution
Assignment Task:

1 Introduction 

An internet games company plans to release a suite of playing-card games. This will enable fervent players of Bridge, Poker, and Hearts to play their favourite games from the comfort of their lounge rooms, thereby avoiding all the tedious social interaction and friend-making involved when playing face-to-face with other humans.1 The company has engaged your software engineering firm to write programs to run various card games. 

Almost all card games involve the ability to manage piles of cards. Cards might be placed into a stock pile, and dealt to players as required. Players often maintain a “hand” of cards, being a pile from which cards are played. Some trick-taking games (like Hearts) might require players to maintain a pile of cards which they have won, which contribute to the player’s score. 

In view of this, the design team has established that the software requires classes to model both individual playing cards, and also piles of playing cards. You, being the star programmer, have been allocated the task of writing a class to model a pile of cards. A formal specification has been supplied; you must write the Java code to satisfy the specification. 

2 The Task 

The file CardPile.java contains the definition of class CardPile. This class contains many methods with empty bodies. The specification of each method is supplied as JavaDoc comments above each method. Some methods are already supplied for you. You must fill in the bodies of each remaining method to implement each specification. 

The contents of a CardPile must be implemented as an array of PlayingCard. The private instance variable list is supplied for this purpose. This array must be maintained exactly at the right length to hold the number of PlayingCards. When cards are added or removed from the pile then the array must be changed accordingly. To this end, write and use the private methods growList() and shrinkList(). When cards are added to a pile they should be added to the end of the list array. Each card pile has a maximum size, stored in private instance variable max list size. The length of list must not exceed this. 

The specification includes methods to add cards to the pile, to find cards in the pile, and to remove cards from the pile. There are methods to count cards of a certain face value or suit. In addition the specification calls for a number of methods which might be used to evaluate a poker hand, i.e. determine if the pile contains cards to be a flush, a straight, a three-of-a-kind, and so forth. 

The PlayingCard class is supplied for you. This class models a single playing card. It has two private instance variables, value and suit, which hold the card’s face value (Ace, King, etc) and suit (Clubs, Diamonds etc) respectively. Face value is modelled with enumerated type CARDVALUE and suit is modelled with enumerated type CARDSUIT. These are all defined in the PlayingCard.java 

This COMP1040: IT Assignment has been solved by our IT Experts at onlineassignmentbank. Our Assignment Writing Experts are efficient to provide a fresh solution to this question. We are serving more than 10000+ Students in Australia, UK & US by helping them to score HD in their academics. Our Experts are well trained to follow all marking rubrics & referencing style.

Be it a used or new solution, the quality of the work submitted by our assignment experts remains unhampered. You may continue to expect the same or even better quality with the used and new assignment solution files respectively. There’s one thing to be noticed that you could choose one between the two and acquire an HD either way. You could choose a new assignment solution file to get yourself an exclusive, plagiarism (with free Turnitin file), expert quality assignment or order an old solution file that was considered worthy of the highest distinction.

Get It Done! Today

Country
Applicable Time Zone is AEST [Sydney, NSW] (GMT+11)
+

Every Assignment. Every Solution. Instantly. Deadline Ahead? Grab Your Sample Now.