Tags:
tag this topic
create new tag
view all tags
---+Mastermind with objects: Fall 2025 ---++ Learning Objective(s) * Learn to create, use and test simple classes ---++ Overview of the Program Modify the previous program so that it uses classes ---++ Specifics * The main program is called <b>MasterMindGame</b> and should not need modifying. * There is a class called <b>Response</b>. You may used it. It should not need modifying. * There is no file i/o for this program. * You will need to write a <b>Pattern</b> class. That stores a solution/guess. The data should be stored in an integer array. * It will need to support the methods classed from the main program. * Use what was discussed in class to help plan the field variable and methods for the Pattern class. * It needs a constant to represent the number of different colors available. * You need to write a unit tester for the <b>Response</b> class. Call it <b>TestResponse</b>. * you may use the solution from the previous lab ---++ Sample dialogue This has not changed ---++Lab Hints none ---++ Submission * Create a software development report * For the system design, you need to make your own flowchart. * For testing report, * make sure your tests ensure that each statement is executed at least one. * your <b>expected output</b> <font color="red">CANNOT</font> be pasted from the dialogue of a running. Only the actual output may be pasted. * you also need to refer to your !TestResponse testing * It should contain at least one different input that is an "error" * For the improvement section, specify how many points were lost from the last lab that you should not lose points for on this lab because you corrected the problem * create a pdf document from your software development report * create an empty zip folder * place your two files (Pattern.java and !TestResponse.java) in the zip folder. If you have modified any of my code, only then should you place them in the zip folder. * place your pdf document into it (with a complete UML diagram for all three classes (not the Test programs)) * submit the zip folder on canvas ---++ Optional improvements Optional improvements should ONLY be worked on once the program is completing working. In addition, the work is to be done on your own with little if any help for lab assistants or the instructor. 1. Only allow the user to enter a valid guess (correct number of pegs and allowed colors) 1. Output the number of guesses it took to get the right answer. At the end of the program, output the average number of guesses over all the games played. 1. Submission instructions a. Any code that is modified should be changed to have the class end in a 2. Include the original code and the new code in the zip folder. Be sure to include appropriate testing data in your sdr for your extra credit
E
dit
|
A
ttach
|
Watch
|
P
rint version
|
H
istory
: r2
<
r1
|
B
acklinks
|
V
iew topic
|
Ra
w
edit
|
M
ore topic actions
Topic revision: r2 - 2025-11-25
-
CathyBareiss
Home
Site map
Assessment web
BethelAIResources2026 web
CenterForComputing web
ChatGPT web
Intro2AIatBethel web
Main web
Sandbox web
TWiki web
CenterForComputing Web
Create New Topic
Index
Search
Changes
Notifications
RSS Feed
Statistics
Preferences
P
P
View
Raw View
Print version
Find backlinks
History
More topic actions
Edit
Raw edit
Attach file or image
Edit topic preference settings
Set new parent
More topic actions
Account
Log In
Register User
E
dit
A
ttach
Copyright © 2008-2026 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki?
Send feedback