cse114 midterm 1 answers

cse114 midterm 1 answers - CSE 114 Midterm Exam 1 KEY...

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

View Full Document Right Arrow Icon
CSE 114 – Midterm Exam 1 KEY Wednesday, February 28, 2007 NAME (please print legibly): Your University ID Number: Your Recitation Number: Please leave at least one seat between yourself and the person next to you. Please use a pen for all answers. No books or notes can be used during the exam, except for your “cheat sheet”. Any CHEATING will result in an F as well as being written-up on academic dishonesty. NO BS bonus: If you do not know the answer to a problem and leave it blank you will receive 1 point for each part (e.g., a,b,c, etc.) that you leave blank. If you write anything in the space and it is wrong, you will receive a 0. The score for a completely blank exam is XX. You will not lose any points for small coding details or occasional misspellings. QUESTION VALUE SCORE 1 20 2 10 3 6 4 15 5 10 6 18 7 6 8 10 9 5 10 10 TOTAL 110 1
Background image of page 1

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

View Full DocumentRight Arrow Icon
1. (20 points) Define a PlayingCard class that represents a single playing card. Every PlayingCard has a suit (represented by a String , either “Clubs”, “Diamonds”, “Hearts”, or “Spades”) and a face value (an integer in the range 1-13, where 1 is an Ace and 11-13 represent the Jack, Queen, and King respectively). Define the following methods for your PlayingCard class: A constructor that takes data for the face value and suit and assigns them to the appropriate instance variables. A method named
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 06/29/2008 for the course CSE 114 taught by Professor Tashbook during the Spring '08 term at SUNY Stony Brook.

Page1 / 8

cse114 midterm 1 answers - CSE 114 Midterm Exam 1 KEY...

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