Skip Top Navigation Bar

Reading Club

Write a program for a book club that tracks a member's daily pages read and awards earned badges. The program will continue to log pages read until a negative page count is entered.

Logging Reading Time

The member logs pages read each day as well as the format they are using to read books. A 0 entry means they didn't read that day. Entering a negative number ends the challenge. The formats used include: PRINT, AUDIO, and READCLUB.

After each daily page entry, the program reports the following:

Determine Test Cases

Develop test cases to represent a member's log. Include different daily reading pages that test the different situations and reporting.

Edge Cases

When testing, you will want to provide values that all the situations of both reading length as well as type of format. Be sure to include tests for edge cases, such as when the number of pages read is 20.

Algorithm

Write your algorithm for this program. Include the input, output, conditions that will be needed. Will you need a loop? Will you need any if statements?

Trace Your Algorithm

Use your test data to trace through your algorithms and make necessary adjustments.

Write Your Program in an IDE

Now that you have planned out your program, it's time to write it in your IDE. Since this program requires input values, use of the Java Playground is not an option.

Create a ReadingClub.java file for your main program file. Add your algorithm to the body of the main method in the starter code provided.