Object-Oriented Programming with Java, part I – Exercise 95

This exercise implements various methods to compare amounts of money in euros and cents. My Code Main Money Model Code Main Money Comments Although it looks like there is a lot of difference at first glance. In fact there wasn’t so much once I started going through it. I probably should have created a new …

Read moreObject-Oriented Programming with Java, part I – Exercise 95

Object-Oriented Programming with Java, part I – Exercise 94

This exercise implements the class Persons and Phonebook and then adds Persons into an ArrayList in Phonebook. My Code Main Person Phonebook Model Code Main Person Phonebook Comments OK, so I didn’t do so well in this one. I have a redundant ArrayList delaration at the top of Phonebook, haven’t done the constructor correctly and …

Read moreObject-Oriented Programming with Java, part I – Exercise 94

Object-Oriented Programming with Java, part I – Exercise 93

This exercise extends the Person class to calculate the age of a person and compare ages to find who is older. My Code Main MyDate Person Model Code Main MyDate Person Comments I don’t like how the current date is worked out in two places but when i went to use it as a global …

Read moreObject-Oriented Programming with Java, part I – Exercise 93

Object-Oriented Programming with Java, part I – Exercise 92

This exercise takes the class MyDate and extends it to calculate the amount of years between two dates taking into account dates with less than year between them and dates where the compared date is after the initial. My Code Main MyDate Model Code MyDate Comments This is a rare case where my code ended …

Read moreObject-Oriented Programming with Java, part I – Exercise 92