Starting from:

$24.99

CIS1300 Assignment 1- A Temporal Challenge Solution


Time, time, time, see what's become of me While I looked around for my possibilities... A Hazy Shade of Winter (Paul Simon)

Introduction

Wouldn’t it be nice to be able to ask how many days separated any two days? Wait no more, you are going to write this wonderfully useful program as your first assignment in CIS1300!

Functionality

You will write this program in increasingly more powerful forms. At each stage you will earn a grade so that it you do all stages you can earn 100% but if you cannot finish the last stage you can earn 80%.


The output format is just the number. For example,
86
$

If include is not on the command line, the program will return the value for


[85%] Stage C) ./daysCalculatorC dd1-mm1-yyyy1 dd2-mm2-yyyy2 include
If include is not on the command line, the program will return the value for

[90%] Stage D) ./daysCalculatorD today dd2-mm2-yyyy2 include
OR ./daysCalculatorD dd1-mm1-yyyy1 today include
This is the same as Stage C except that either of the dates can be the string “today”

[100%] Stage E) ./daysCalculatorE dd1-mm1-yyyy1 dd2-mm2-yyyy2 include

Information That You Will Need


The following table contains the Day-of-Year value for the first day of each month in a non-leap year:
Feb: 32 Jun: 152 Oct: 274
Mar: 60 Jul: 182 Nov: 305
Apr: 91 Aug: 213 Dec: 335

The following table contains the Day-of-Year value for the first day of each month in a leap year:
Feb: 32 Jun: 153 Oct: 275
Mar: 61 Jul: 183 Nov: 306
Apr: 92 Aug: 214 Dec: 336

On https://nsidc.org/data/tools/doy_calendar.html you will find a nice graphic showing all of the Day-of-Year for each day of the year for non-leap years and leap years.
Checking Your Work

More products