7Im_fE+A.htm.part - CSE 332 Lab 2 Cards Hands and Scores...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
CSE 332 Lab 2: Cards, Hands, and Scores Lab dates: Wednesday February 3 and Wednesday February 10, 2010 Due by Tuesday February 16 at 11:59 pm (deadline for e-mailing a zip file with your solution) Final grade percentage: 5 percent Objective: This lab is intended to extend your use of basic C++ language features from the previous lab, and to introduce more advanced techniques like the use of member operators and algorithms from the C++ STL, including: adding a less-than comparison operator ( operator< ) to a struct, and using the STL sort algorithm to order objects To do this, you will implement a simple C++ program that can (1) read sets of 5 cards from a file, sort the cards in each set into ascending order by rank and then suit, and then assign a score to the set based on its rank in poker (assuming a single standard 52 card deck with no wild cards). In this lab and in the subsequent labs, you are encouraged to re-use and modify code from your previous lab solutions - if you choose do this, please put a completely new copy of any header and source files from your previous lab(s) in the new lab project directory you create. This can avoid some potential for error or confusion within Visual Studio, and also ensures you have a backup copy that you could go back to if a modification you try doesn't pan out. Assignment: Part I - Readings: 1. The following readings in the optional text books may be useful as reference material while working on this lab assignment, and though we'll touch on most of the issues in the next few studio sessions, selectively looking up topics and/or reading ahead (on demand as you encounter issues while working on the lab) is encouraged: STL sort algorithm: Prata pp. 885-889; Deitel 7th Ed. pp. 970-972 file streams: Prata pp. 1003-1008; Deitel 7th Ed. pp. 717-721 2. The C++ string class, file input and output stream, and input and output stringstream examples in the C++ Data and I/O lecture slides also again may be helpful when implementing parts this lab. 3. Please read the following CSE 332 Programming Guidelines which are again relevant to this lab as well as the previous one, and please follow them as you implement your solution: A.1-A.6, A.9-A.11, A.17, B.7, B.9, B.13, B.15, B.16, B.20-B.23, B.25, B.30, B.33, B.34, C.1-C.4 and C.6-C.9.
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Part II - Program Design and Implementation: Note: the details of this assignment are again intentionally somewhat under-specified, leaving you some room to choose what you think is the best way to implement them, as long as what you do is reasonable and you explain your design decisions in comments in the code and in your Readme.txt file. Also note that your lab 2 project will extend your lab 1 solution by modifying some features and adding others. 4. Open up Visual Studio, and create a new Win32 Console Application Visual C++ project for lab 2.
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 03/03/2010 for the course CSE 332S taught by Professor Smart during the Spring '08 term at Washington University in St. Louis.

Page1 / 5

7Im_fE+A.htm.part - CSE 332 Lab 2 Cards Hands and Scores...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online