Specifically, your program must have at least the following two methods:
// ======================= // // returns the secret code // // ======================= // static int generateCode()and
// ================================================== // // scores the guess. returns true iff code == guess // // ================================================== // static boolean scoreGuess( int code, int guess )
Optional part: As you are rewriting prog2 to use methods, also think about possibly using arrays as an alternative way of managing and scoring secret codes and guesses.
submit cmps012a-ap.w15 lab3 Mastermind.java and/or submit cmps012a-ap.w15 lab3 BonusMM.java
Make sure that for this program, and all other programs you write for CMPS 12A this quarter, have been recompiled and tested on unix.ic.ucsc.edu before submission.
100 -- if meets most requirements i.e. compiles/runs, has comment block with correct info, code is properly documented/formatted. 75 -- if missing comment block, or poor formatting, or lack of documentation 50 -- has submission, but problem with compilation or crashes, empty file, wrong filename, wrong class name, doesn't run, requires manual intervention by grader, etc. (i.e. compilation or runtime errors) 50 -- if compiles and runs, but different or wrong sequence of codes / numbers (and answers) (i.e. logic errors) 0 -- no submission Who Will Grade What: -------------------- Ryan : aalkahel - dlopez8 Kara : dlskilli - jssorens Derek : jtorre34 - romarks Eitan : rpickett - zwang58