ASSIGNMENT ONE – GAME ZONE ASSIGNMENT ONE – GAME ZONE LO-COMP 8014 SUBMISSION INSTRUCTIONS Send ONE *.zip or *.rar compressed file containing all your *.java files. Submit your assignment through...

pfa


ASSIGNMENT ONE – GAME ZONE ASSIGNMENT ONE – GAME ZONE LO-COMP 8014 SUBMISSION INSTRUCTIONS Send ONE *.zip or *.rar compressed file containing all your *.java files. Submit your assignment through blackboard (submit assignment link). Name your assignment file (the zip file) Assignment_One_. For example; Assignment_One_Neilsen_Janeil.zip GRADING MATRIX The following provides you with feedback on each area you are graded on for the assignments in this course. Trait 90% –- 100% 70% –- 89% 50% - 69% 0% - 49% Specifications The program works The program works and The program produces The program is and meets all of the produces the correct correct results but does producing incorrect specifications. results and displays not display them results. them correctly. It also correctly. meets most of the other specifications. Readability The code is The code is fairly easy The code is readable The code is poorly exceptionally well to read. only by someone who organized and very organized and very knows what it is difficult to read. easy to follow. supposed to be doing. Reusability The code could be reused as a whole or Most of the code could be reused in other Some parts of the code could be reused in other The code is not organized for each routine could programs. programs. reusability. be reused. Documentation The documentation The documentation The documentation is The documentation is is well written and consists of embedded simply comments simply comments clearly explains what comment and some embedded in the code embedded in the code the code is simple header with some simple header and does not help the accomplishing and documentation that is comments separating reader understand the how. somewhat useful in routines. code. understanding the code. Delivery The program was The program was The code was within 2 The code was more delivered on time. delivered within a week weeks of the due date. than 2 weeks overdue. of the due date. Efficiency The code is The code is fairly The code is brute force The code is huge and extremely efficient efficient without and unnecessarily long. appears to be patched without sacrificing sacrificing readability together. readability and and understanding. understanding. Java Introduction 8014 | Version 7 ASSIGNMENT ONE – GAME ZONE LO-COMP 8014 ASSIGNMENT BACKGROUND This assignment builds upon the lecture notes and chapters 1 to 3. ASSIGNMENT PREPARATION In order to prepare for this assignment question you should attempt:  all debugging exercise in chapters 1 to 3  complete 5 exercises from chapters 1 to 3 (odd questions) ASSIGNMENT QUESTION – Game Zone Playing cards are used in many computer games, including versions of such classics as Solitaire, Hearts, and Poker. Design a card class that contains a character data field to hold a suit (“s‟ for spades, “h‟ for hearts, “d‟ for diamonds, or “c‟ for clubs) and an integer data field for a value from 1 to 13. Include get and set methods for each field. Save the class as Card.java Write an application that randomly selects two playing cards and displays their values. Simply assign a suit to each of the cards, but generate a random number for each card‟s value. For now, just observe how the card values change as you execute the program multiple times. Save the application as PickTwoCards.java Hint: Use the Math.random() function to generate a random number. The function call uses only a class and method name – no object – so you know the random() method must be a static method. You can learn more about how to generate random numbers in Appendix D. For bonus marks: You can modify the Card class to hold words for the suits, such as “spades” or “hearts” and words for some of the values – for example, “ace” or “king”. Java Introduction 8014 | Version 7
Feb 12, 2021
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here