Repetition well done: Yearly Calendar: Fall 2024

Learning Objective(s)

  • Strengthen skills with repetition
  • Experience with lot's of details and the need for abstraction

Overview of the Program

Adapt the previous calendar program to display an entire year, not just one month

Specifics

  • Same as in lab 4 except:
    • only get the year and the day Jan. 1st starts on
    • display the entire year's calendar

Sample dialogue

Below is a sample dialogue. The prompts may vary but the input given by the user is to be the same format. Your output can vary somewhat as long as the required data is nicely displayed.
What year (between 1700 and 2700)? 2024
What day does the year start on (0-6)? 1
Jan
     1  2  3  4  5  6
  7  8  9 10 11 12 13
 14 15 16 17 18 19 20
 21 22 23 24 25 26 27
 28 29 30 31
Feb
              1  2  3
  4  5  6  7  8  9 10
 11 12 13 14 15 16 17
 18 19 20 21 22 23 24
 25 26 27 28 29
Mar
                 1  2
  3  4  5  6  7  8  9
 10 11 12 13 14 15 16
 17 18 19 20 21 22 23
 24 25 26 27 28 29 30
 31
Apr
     1  2  3  4  5  6
  7  8  9 10 11 12 13
 14 15 16 17 18 19 20
 21 22 23 24 25 26 27
 28 29 30
May
           1  2  3  4
  5  6  7  8  9 10 11
 12 13 14 15 16 17 18
 19 20 21 22 23 24 25
 26 27 28 29 30 31
Jun
                    1
  2  3  4  5  6  7  8
  9 10 11 12 13 14 15
 16 17 18 19 20 21 22
 23 24 25 26 27 28 29
 30
Jul
     1  2  3  4  5  6
  7  8  9 10 11 12 13
 14 15 16 17 18 19 20
 21 22 23 24 25 26 27
 28 29 30 31
Aug
              1  2  3
  4  5  6  7  8  9 10
 11 12 13 14 15 16 17
 18 19 20 21 22 23 24
 25 26 27 28 29 30 31
Sep
  1  2  3  4  5  6  7
  8  9 10 11 12 13 14
 15 16 17 18 19 20 21
 22 23 24 25 26 27 28
 29 30
Oct
        1  2  3  4  5
  6  7  8  9 10 11 12
 13 14 15 16 17 18 19
 20 21 22 23 24 25 26
 27 28 29 30 31
Nov
                 1  2
  3  4  5  6  7  8  9
 10 11 12 13 14 15 16
 17 18 19 20 21 22 23
 24 25 26 27 28 29 30
Dec
  1  2  3  4  5  6  7
  8  9 10 11 12 13 14
 15 16 17 18 19 20 21
 22 23 24 25 26 27 28
 29 30 31
You can also run a solution for this program if you want. See classroom instructions for more details.

Lab Hints

  • Hint 1: a flowchart that you can use: This flowchart is a bit more abstract on purpose. Your programming should be advancing.
  • Hint 2: Computing if a year is a leap year: See the Internet
  • Hint 3: Use the solution from lab 4 to get started

Submission

  • Create a software development report
    • For the system design, you may use my flowchart if it is the design of your program. Otherwise, you need to make your own.
    • For testing report,
      • display complete correct output in your report for at least one year to show what it should look like. You don't need to display the complete output for each test.
      • make sure you do statement coverage testing
      • at the end of the testing report include a statement about how many different tests would be needed if you did path coverage testing and why that is the number.
    • 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
    • If the solution is used, that should be included in "Outside Resources"
    • create a pdf document from your software development report
    • create an empty zip folder
    • place only Calendar.java and your pdf document into it
    • 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. Compute the day of the week a year starts. This version should be called CalendarExtra.java and should also be placed in the zip folder before submitting the lab.
Edit | Attach | Watch | Print version | History: r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions...
Topic revision: r1 - 2024-06-12 - CathyBareiss
 
  • Edit
  • Attach
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 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