The data must be readable when opened in a standard text editor. An example results file is illustrated as follows, though exactly how your file is organized is up to you. Bulls & Cows game result. Your code: 4568 Computer's code: 4281 Turn 11 You guessed 1234, scoring 1 bull and 2 cows Computer guessed 5940, scoring bulls and 2 cows www Turn 21 You guessed 1345, scoring e bulls and 2 cows Computer guessed 1279, scoring @ bulls and cows Turn 31 You guessed 4271, scoring 3 bulls and cows Computer guessed 4890, scoring 1 bull and 1 cow Turn 4: You guessed 4281, scoring 4 bulls and cows You win! :) NW Task Eight: Advanced Configuration Save your Task 7 code on a different package. Modify your code so that two of the following values are configurable for Easy Al: *The maximum allowed number of turns before the game ends in a draw (default is seven) The length of a secret code (default is four) *The allowed characters in a secret code (default are the digits 0-9, but letters should be able to be included also. For example, you could say that the allowed characters for a particular game are the digits 0-9, and the letters A-F). To configure these values, you may either read them in from a file or simply have constant variables somewhere obvious in your code, which the user can edit and then re-compile. Note: It is important that, when configuring these values, the rest of your code should not break! Everything else should continue working as normal.
The data must be readable when opened in a standard text editor. An example results file is illustrated as follows, though exactly how your file is organized is up to you. Bulls & Cows game result. Your code: 4568 Computer's code: 4281 Turn 11 You guessed 1234, scoring 1 bull and 2 cows Computer guessed 5940, scoring bulls and 2 cows www Turn 21 You guessed 1345, scoring e bulls and 2 cows Computer guessed 1279, scoring @ bulls and cows Turn 31 You guessed 4271, scoring 3 bulls and cows Computer guessed 4890, scoring 1 bull and 1 cow Turn 4: You guessed 4281, scoring 4 bulls and cows You win! :) NW Task Eight: Advanced Configuration Save your Task 7 code on a different package. Modify your code so that two of the following values are configurable for Easy Al: *The maximum allowed number of turns before the game ends in a draw (default is seven) The length of a secret code (default is four) *The allowed characters in a secret code (default are the digits 0-9, but letters should be able to be included also. For example, you could say that the allowed characters for a particular game are the digits 0-9, and the letters A-F). To configure these values, you may either read them in from a file or simply have constant variables somewhere obvious in your code, which the user can edit and then re-compile. Note: It is important that, when configuring these values, the rest of your code should not break! Everything else should continue working as normal.
Chapter14: Files And Streams
Section: Chapter Questions
Problem 2E: Create a program named FileComparison that compares two files. First, use a text editor such as...
Related questions
Question
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 4 steps with 7 images
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Recommended textbooks for you
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning