One of the hardest parts of programming is dealing with the users. They do erratic things despite all your best warnings and error messages.
One of the areas where users are the worst - dates. For this assignment I want you to write a rather incomplete program. All you have to do is ask the user what month, day and year they want to leave on.
The challenge is that you must make sure that is indeed a real date. Use this old poem as your guide: Thirty days hath September, April, June, and November; All the rest have thirty-one, Save February, with twenty-eight days clear, And twenty-nine each leap year. There is one catch - you must be prepared for a leap year. Leap year is a year when an extra day is added to February to keep the whole sunshine-during-the-day thing in wack.
If a year is a leap year, there will be a February 29th! How do you know if it is a leap year? Test it as follows: Every year that is evenly divisible by four is a leap year Except- if it can be evenly divided by 100, it is NOT a leap year Unless the year is evenly divisible by 400, then it is a leap year. All you need to tell the user – date does not exist or valid date.
DescriptionIn this final assignment, the students will demonstrate their ability to apply two ma
Path finding involves finding a path from A to B. Typically we want the path to have certain properties,such as being the shortest or to avoid going t
Develop a program to emulate a purchase transaction at a retail store. Thisprogram will have two classes, a LineItem class and a Transaction class. Th
1 Project 1 Introduction - the SeaPort Project series For this set of projects for the course, we wish to simulate some of the aspects of a number of
1 Project 2 Introduction - the SeaPort Project series For this set of projects for the course, we wish to simulate some of the aspects of a number of