Using Java;
The second part is to write a program (Duck.java) to print out a text-based shape of a duck using ASCII characters. To get full credits for this part, students should write a program to print out 5 little ducks lined up vertically. The picture on the right is the text-based shape that you need to follow, and it is provided along with the starter project as a reference.
To get full credits for this part, students should write exactly 3 methods (main method included):
- A method printDuckO to print a duck
- A method printDucksO to print 5 ducks vertically by calling printDuckO
- A main method to call the method printDucksO.
Extra Credit: We are going to print out 5 ducks to the console horizontally. To implement this method, students need to use a for-loop statement(s) to capture the frame width of the duck. Students will need to calculate it by counting the number of characters from the left to the right. This part also requires students to use a static method to remove redundancy. Successfully finishing this part will be worth 0.5% added to the final grade.