ECE 325 OBJECT-ORIENTED SOFWARE
Assignment 1: Using Standard Libraries
A working copy of your solution must be
submitted to eClass before this date.
A programmer spends a great deal of their time using other people’s solutions including predefined
solutions which are part of Java. This implies reading their documentation which is always less than
perfect! In fact, the documentation is often terrible!! However, rebuilding existing solutions is seldom
cost effective and hence using pre-existing solutions is a must for the professional programmer.
So let’s have a go …
Write a piece of Java code, which tells you how old you are — sounds simple. In other words, you fill
the days method (You can use Eclipse to do it if you like), and it outputs:
Birthday: January 1 2000; today: June 15 2000 — You are 166 days old.
Birthday: January 1 3000; today: June 15 2000 — Wrong birthday!
Clearly, the problem gets more complex as the years progress due to leap years.
To write this program you must use Java’s calendar classes. Good grief, just look at that
(ummmm… are there other classes that I need to use??? Good question to ponder)
Remember programming is actually more about reading than writing, and class Calendar (do I need
to know what a Gregorian calendar is?) is certainly an eye-full.
1 of 4 2018-12-22, 9:18 p.m.
Attempt number This is attempt 1.
Submission status Submitted for grading
Grading status Graded
Due date Thursday, 20 September 2018, 5:00 PM
Time remaining Assignment was submitted 1 day 2 hours early
Last modified Wednesday, 19 September 2018, 2:56 PM
Export to portfolio
Make changes to your submission
Grade 10.00 / 10.00
Graded on Tuesday, 25 September 2018, 2:25 AM
Graded by Mona Nashaat Ali Elmowafy
2 of 4 2018-12-22, 9:18 p.m.
3 of 4 2018-12-22, 9:18 p.m.
You are logged in as Arun Woosaree (Log out)
ECE 325 (LEC A1 Fa18)
4 of 4 2018-12-22, 9:18 p.m.