![]() |
Assignment 07TaskUse conditionals to sort through the morass of Bleegian bureaucracy. (This program will be the basis of our first studio: see "What to submit", below.)
Concepts: comparison operators; Setting [flavor]Bleeg is a small, remote planet cursed with a bloated governmental bureaucracy. In a recent attempt at reform, the myriad administrative offices and departments were combined into three massive agencies:
Its long history of excessive paperwork has strained Bleeg's natural resources. For this reason, citizens must present ID to pick up forms at any of the three departments. Additionally, before any white forms can be turned in, current pink and blue forms must also be completed in order to prove the applicant is a healthy, viable member of society (and so worth the expense of the various forms they will have to complete). As if this were not enough hassle, each of the departments are open on different days. And the CMA will only give out forms on some days and accept returned forms on other days. However, computers are just being introduced to Bleeg. Through a series of sordid events (it's a long story), you are currently serving time in the Bleegian programming pits. It has fallen to you to implement the first program meant to cut through the Bleegian bureaucracy: a program that will tell citizens which forms they can pick up or turn in on any given day. What you need to know [requirements]Bleegian calendar. The Bleegian year of 364 days is divided into 13 months of exactly 28 days each. Bleegians start counting days of the month at 0, however. So a month would include: Day 0, Day 1, Day 2, ... Day 26, Day 27. Like us, Bleegians also have a week of 7 days. The days are, oddly, named the same as ours: Sunday, Monday, Tuesday, etc. The week starts with Sunday. Because every month is exactly 4 weeks long, every Day 0 is a Sunday, every Day 1 is a Monday, and so on. Actually, while Day 0 is technically a Sunday, it is a special holiday for all Bleegians and is always called Festival. (Day 7, Day 14, and Day 21 are all normal Sundays.) To further complicate matters, some Bleegian's prefer to number days from the end of the month, rather than the beginning. To prevent total confusion, dates in this "count-down" calendar are given as negative numbers. Therefore, Day -1 == Day 27, Day -2 == Day 26, Day -3 == Day 25, and so on. Luckily, both the standard and the count-down calendars coincide on Day 0. Department days. Here are the details of the departments:
The program requirements.
Remember, the Bleegian jute mills await you should you fail at this task! OutputHere is some sample output of a few runs: D:\TA\grading\A07>java ZtomaszeA07 Please enter the current Bleegian day of the month: 30 Sorry, but 30 is not a valid day of the month. D:\TA\grading\A07>java ZtomaszeA07 Please enter the current Bleegian day of the month: 0 Today (Day 0) is Festival. You can pick up no forms today. You can drop off no forms today. D:\TA\grading\A07>java ZtomaszeA07 Please enter the current Bleegian day of the month: -8 Today (Day 20) is Saturday. You can pick up these forms: pink You can drop off these forms: pink white D:\TA\grading\A07>java ZtomaszeA07 Please enter the current Bleegian day of the month: 14 Today (Day 14) is Sunday. You can pick up these forms: pink blue You can drop off these forms: pink blue white D:\TA\grading\A07>java ZtomaszeA07 Please enter the current Bleegian day of the month: 3 Today (Day 3) is Wednesday. You can pick up these forms: white You can drop off these forms: What to Submit
Upload your Note the A07a designation. We will hold a studio on this assignment, meaning other students will get a chance to review your code, and you will get to review theirs. Then, you will have one week to make any revisions you want and then (optionally) submit A07b. For your final A07 grade, I will average your A07a and A07b grades (if you submit A07b).
To resubmit after the studio, upload your Grading [6 points]
FAQs
|
~ztomasze Index :
TA Details: ICS111:
A07 http://www2.hawaii.edu/~ztomasze |
Last Edited: 30 Sep 2008 ©2008 by Z. Tomaszewski. |