Project 1 (download pdf):

Palindromes

Palindromes are character sequences that read the same forward or backward (e.g. the strings "mom" or "radar" or “kayak” or “1234321”). You will write a program to determine whether a string is a character-unit palindrome.

Note: Programming Project should be done primarily on your own. However, it is appropriate to get some support from your professor, and even other students. Refer to the Syllabus for guidelines. Remember to use Piazza and post your partial code if you are stuck with a problem in your code.

Requirements

Example Output

Enter the string to evaluate for palindrome: Kayak
Kayak is a palindrome
Do you want to try again (Y or N)? Y
Enter the string to evaluate for palindrome: evil
evil is not a palindrome
Do you want to try again (Y or N)? N
Thanks for playing!

Due: Submit your palindrome.java file to Blackboard. October 30, 2017 by 6.00 PM November 03, 2017  by 12 midnight

Total Points = 100 + 2 Bonus Points


Project 2: (download pdf):

Bulls and Cows

Bulls and Cows is a guessing game where you try to guess an 'n' digit code. (Note: each number in the code must be distinct) When a number is guessed and a digit is in the correct location, then that is a bull. When a digit is in the number, but in the incorrect location, then that is a cow. So if a 3 digit code is 289, and the user guesses 829. Then that is "1 bull and 2 cows" because '9' is in the correct location and '2' and '8' are in the code but are currently in the wrong location. The guessing continues until the code is guessed in the correct order... "3 bulls"!

This website will give you a feel for the game. To emulate our version using 3 digits, click on "Options" and select any 0-9, 3 Codes. http://www.mathsisfun.com/games/bulls-and-cows.html

Note: Programming Project should be done primarily on your own. However, it is appropriate to get some support from your professor, and even other students. Refer to the Syllabus for guidelines. Remember to use Piazza and post your partial code if you are stuck with a problem in your code.

Requirements

                 /*     Name: Jane-Joe
           *      Bronco ID: 12345678
           *      Jon Doe helped me with…………
           */

 Example Output

Welcome to “Bulls and Cows”

Which option do you want to play? 3 digits, 4 digits or 5 digits? 3

 

Number to guess: ???

Enter guess: 89

2 bulls

0 cows

Enter guess: 29

3 bulls - 029 is Correct!

 

Enter 'y' to play again: Y

Which option do you want to play? 3 digits, 4 digits or 5 digits? 3

Number to guess: ???

Enter guess: 268

1 bulls

0 cows

 

Enter guess: 16984

“You can only enter 3 digits!”

Enter guess: 169

0 bulls

0 cows

 

Enter guess: 568

1 bulls

1 cows

 

Enter guess: 558

“Each digit must be different!”

 

Enter guess: 258

2 bulls

0 cows

 

Enter guess: 458

3 bulls - 458 is Correct!

 

Enter 'y' to play again: Y

Which option do you want to play? 3 digits, 4 digits or 5 digits? 4

Number to guess: ????

Enter guess: quit

Number to guess: 3492

 

Thanks for playing! Goodbye.

Due: Submit your BullsAndCows.java file to Blackboard. December 01, 2017 by 11.59pm midnight

Total Points = 100