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

This program gets you to create three methods, one for white-spaces and one for stars. The third method combines the other two to create Christmas tree shapes. My Code Model Code Comments Mine is very messy compared to the model solution.

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

This programs creates a method printStars that prints the given amount of stars and a line break and then uses that in other methods to print a square, rectangle and triangle. My Code Model Code Comments This had me buggered for a while and it turned out the error was because I was printing a […]

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

This program asks a user how many times to print a line of text and then executes the input. My Code Model Code Comments Using — to subtract down to zero in the loop is a nice way of not having to include another variable.

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

This program creates a method printText that prints the following string of characters: “In the beginning there were the swamp, the hoe and Java.” and a line break. My Code Model Code Comments Both are exactly the same.