Em Andamento

Simple JAVA Assignment (Interface & Polymorphism)

Create an interface named Turner, with a single method called turn(). Then create 4 classes:

1 - Leaf: that implements turn(), which changes the color of the Leaf object and returns true. If for any reason it is unable to change color, it should return false (you can come up with a reason for failure). The new color can be determined at random.

2 - Document: that implements turn(), which changes the page on the document to the next page and returns true. If the current page is the last page of the document, then it returns false. This class should have a method called returnIdDate(), which returns a String containing the ID of the Document and the date it was published.

3 - Pancake: that implements turn(), which flips the pancake if it has not flipped before and returns true. If the pancake has already been flipped, then it returns false.

4 - Think of one more objects that can use turn(). Create the class and implement the turn() method. Show your creativity.

These should be complete classes with appropriate fields and methods (setters, getters, toString, and equals method)

Write an application, DemoTurners, which creates an array of 4 Turner objects and adds one object of each of these class types to it. Then demonstrate polymorphism by calling the turn() method on each object in a loop. Then print the Document object’s returnIdDate method using the Turner object.

NOTE: You need to show the polymorphism aspect of Interfaces.

*Attached Document is the same

Habilidades: Java

Ver mais: simple java application, java simple array, create simple java application, create java object, page turner, object assignment java, java simple class, java object assignment, java simple application, implement interface, Java string, simple gui assignment java, java simple gui assignment, turner, simple method java, simple assignment java, java turn, simple string class, write simple string class, java calling, java simple assignment, single page interface, class assignment, java array, interfaces java

Acerca do Empregador:
( 14 comentários ) New York City, United States

ID do Projeto: #5111059

Premiar a:

waverick

Hello, 14+ years of Java experience. Should be no problem. Only... what do you mean with "returnIdDate"?... is it a timestamp? gr, Jacco

$25 USD em 1 dia
(20 Avaliações)
4.6

6 freelancers estão ofertando em média $40 para este trabalho

urmate

Contact me for an efficient, perfect, well documented development of your project according to 100% accuracy and requirements, with dedicated support. Thanks

$25 USD em 1 dia
(41 Comentários)
4.8
ielkfarna

Dear Sir, I am Professional Software Developer, I am Linux Advanced Developer, I am Database Developer and designer. I can Handle your job and do everything extremely Grate. Regards,

$107 USD in 5 dias
(9 Comentários)
4.5
crazynightwalker

Hi, I am a professional programmer with 10 years of experience. With so many programs written in Java, C, C++, C#, Delphi, and others (web programming too) I can complete your project. Thanks.

$20 USD em 1 dia
(8 Comentários)
3.1
kawsar92

I can help you in this assignment.I have a reputation of 95% project [url removed, login to view] you'll contact me for your project.

$30 USD em 1 dia
(12 Comentários)
3.0
suy99

Hello, i have 5+ yrs of experience working on java, I am ready to start it right now, Thanks, Suy99.

$30 USD em 1 dia
(0 Comentários)
0.0