![](https://static.isu.pub/fe/default-story-images/news.jpg?width=720&quality=85%2C50)
1 minute read
4 card
from COMP 220 COMP220 COMP/220 Week 1 Lab Two-Dimensional Arrays – Southern Alberta Institute of Technolo
by solvedcp
COMP 220 Week 1 Lab Two-Dimensional Arrays – Southern Alberta Institute of Technology (SAIT)
This lab requires you to design and implement a C++ program to simulate a game of Blackjack between two to four players. Your program must incorporate a two-dimensional array to represent the suit and the value of each card dealt to a player, keep track of which cards have been dealt to which player, and use a random-number generator to pick each card to be dealt to a player.
Advertisement
Deliverables
1. Submit a single Notepad file containing the source code for Lab 1 to the Dropbox for
Week 1. Your source code should use proper indentation and be error free. Be sure that your last name and the lab number are part of the file name: for example,
Y ourLastName_Lab1.txt.
Each program should include a comment section that includes, at a minimum, your name, the lab and exercise number, and a description of what the program accomplishes. 2. Submit a lab report (a Word document) containing the following information to the
Dropbox for Week 1. o Include your name and the exercise number. o Specification: Include a brief description of what the program accomplishes, including its input, key processes, and output. o Test Plan: Include a brief description of the method you used to confirm that your program worked properly. If necessary, include a clearly labeled table with test cases, predicted results, and actual results. o Summary and Conclusions: Write a statement summarizing your predicted and actual output, and identify and explain any differences. For your conclusions, write at least one nontrivial paragraph that explains, in detail, either a significant problem you had and how you solved it or, if you had no significant problems, something you learned by doing the exercise. o Answers to Lab Questions: Answer any and all of the lab questions included in the lab steps.
Each lab exercise should have a separate section in the lab-report document.
iLAB STEPS
STEP 1: Starting Visual Studio Create a new Visual Studio empty project, and add one C++ source code file.
STEP 2: Coding Enter the following source, which will set up the 2D array and the recommended variable declarations. It is up to the student to design and implement the remainder of the program code.