Tags:
tag this topic
create new tag
view all tags
---+ Repetition 2: A month's calendar: Spring 2024 ---++ Learning Objective(s) 1 Improving repetition skills 1 Learn the *for* loop 1 Become independent when using selection statements 1 Learn to use a switch statement ---++ Overview of the Program For this lab you are to create a program that displays the calendar of a month. ---++ Specifics * The program should be called *DisplayMonth* * Input should be the year, followed by the month, and then the day it starts on (with Sunday being 0 and Saturday being 6) * The name of the month should be displayed first (you may choose the language) * You must use at least one *for* statement * You must account for leap year. Note: leap year is not a simple as every four leaps. Research the details. * The month days should line up nicely. ---++Sample dialogue Below is a sample dialogue. Your output can vary somewhat as long as the required data is nicely displayed <pre>What is the year, month and day of the week? <b>2023 09 05</b> September 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 </pre> You can also run a solution for this program if you want. See classroom instructions for more details. ---++Submission a. Create your SDR. * In *Lessons Learned*, include a discussion on which selection statements you used and why. Also include a discussion on how complex the code seems * Your testing should include at least 2 different types of errors and ensure that every line of code is executed at least once and there is a least one month for each starting day. The actual start day does not have to be accurate (unless you are doing the extra credit) * If you used any hints, be sure to indicate that in the *Outside Resources Used* section a. Convert your SDR into a pdf document a. Create an empty zip folder a. Place your java file and pdf document in it. a. Submit the zip folder on canvas ---++Hints 1 [[CSC121S2024Lab04Hint1][Algorithm hint]] 1 [[CSC121F2023Lab04Hint2][Leap day]] 1 [[CSC121F2023Lab04Hint3][Formatting nicely]] ---++ 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 first day of the month
E
dit
|
A
ttach
|
Watch
|
P
rint version
|
H
istory
: r1
|
B
acklinks
|
V
iew topic
|
Ra
w
edit
|
M
ore topic actions
Topic revision: r1 - 2024-01-26
-
CathyBareiss
Home
Site map
Assessment web
BethelAIResources2026 web
CenterForComputing web
ChatGPT web
Intro2AIatBethel web
Main web
Sandbox web
TWiki web
CenterForComputing Web
Create New Topic
Index
Search
Changes
Notifications
RSS Feed
Statistics
Preferences
P
P
View
Raw View
Print version
Find backlinks
History
More topic actions
Edit
Raw edit
Attach file or image
Edit topic preference settings
Set new parent
More topic actions
Account
Log In
Register User
E
dit
A
ttach
Copyright © 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