The goal of this assignment is simple: write a video poker game. The game will follow the
jacks or better rules listed at Wikipedia.
Playing Video Poker
Video poker works a lot like
real poker, though there are a few differences. A game follows these steps:
- Before any cards are dealt, the player selects the number of credits she wants to wager on the hand (between 1 and 5). These credits are deducted from the player’s balance before the hand is dealt. If the player wagers more than she has, put up a status message and ask again.
- The hand is dealt and displayed.
- The player selects zero or more cards to keep. Cards are selected by clicking on them; the word
HELDappears over cards that will be kep
A multithreaded malloc
Your task in this assignment is to implement a multithreaded malloc i.e. we
should be able to use it in a multithreaded application. The basic require-
ment is of course that it is thread safe, that it still works even if two threads
us it at the same time. This is of course very easy to solve by having one
central lock that protects any data structures that are used by the module.
It is a bit harder to allow multiple threads to actually use the malloc module
(Matrices and File I/O) Write a Python script named cluster_counter.py that takes command line arguments. The first argument will be a filename. The file loaded will contain an n by m matrix of different characters. This n by m matrix denotes different clusters where each same character represents a group. Casing is not important (i.e A and a are the same group). Touching characters (meaning adjacent and diagonal) of the same group are assumed to be in the same cluster. Write a program that tells the user how many groups exist and for each group, how many sub clusters exist. (20 points)
Example file test.m
A B A A A
A B A A A
B B A A A
python cluster_counter.py test.m
You have 2 groups: A, B
The Number of clusters are listed below
A : 2
B : 1
Use a Linked List and a set of Derived Classes from a Base Class to demonstrate polymorphism in C++. To do so, alter linked-list source code to run a family of mobile phone derived classes, and create a menu to demonstrate the functionality. Students are allowed to work in groups or cohorts. For ease of submission, please e-mail the instructor the members of your cohort before the due date.
The Linked List
Sample code is available to create a linked list on Blackboard. Alter this code to create a linked list capable of handling the derivation tree of a series of mobile phones. The base class is mobile phone.
The linked list must be an independent class, and must have the following data and functions:
- MobilePhone * head – a pointer to the first location in the linked list.
- MobilePhone * tail – a pointer to the last location in the linked l