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

Veja 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:
( 0 comentários ) United States

ID do Projeto: #5118717

50 freelancers are bidding on average $21 for this job


10+ years JAVA experience. 500+ projects completed successfully. I am very interested in this assignment. Ready to start ASAP.

$30 USD em 1 dia
(309 Comentários)

Hi, I am placing my bid on your project because I have read the requirements and I am confident enough with my Java skills. I am focused mostly on doing computer science homework here in freelancer.com and I would like Mais

$30 USD in 0 dias
(231 Comentários)

A proposal has not yet been provided

$25 USD in 3 dias
(54 Comentários)

Hello Snax, Have experience working with this. Can help you in doing this. Thanks, Saran

$14 USD in 0 dias
(25 Comentários)

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

$23 USD em 1 dia
(44 Comentários)

Hi there, I've read your document. I can do this task within some hours. Pls check my page to get more info about me (passed exams, previous custome reviews, exp, ...). Let me help you! Best regards, Duc Nguyen

$25 USD in 0 dias
(40 Comentários)

I am very proficient in java. I have 12 years java developing experience. I have worked for 5 years, my work is online game developing, and mainly focus on server side, the language is java under linux OS, sometimes us Mais

$35 USD em 1 dia
(17 Comentários)

Looks as something pretty easy for me, it can be done in several hours. I have enough JAva skills for completing this project.

$23 USD em 1 dia
(39 Comentários)

Hi there. I am senior developer from Vietnam. I have been working on this site for 2 years. I am interested in your [url removed, login to view] let's me help you.

$55 USD em 1 dia
(14 Comentários)

I can do this in a day. Let me know if you are interested and when can we start.I am an experienced java developer, you can view my past projects

$25 USD in 3 dias
(10 Comentários)

easy to do task. About time limit: Due: 11/15/. Please check that I will have at least 1 day before this date to provide you with solution.

$20 USD em 1 dia
(1 Comentário)

Dear Sir, I am writing with regards to the project you have posted on freelancer.com. I am professional Java developer so I should have no problems in completing your task within 1 day. Please let me know if I Mais

$35 USD in 3 dias
(8 Comentários)

Hi, 7+ years expert java programmer. I can handle your task very well. I hope I shall not disappoint you if you choose me. Best Regards, Khalid Hafeez

$20 USD em 1 dia
(4 Comentários)

Hi...here is Java developer .i can do it in 2 to 3hours only.i have exp for that..i can do it very quickly. Thank you

$20 USD in 0 dias
(2 Comentários)

Hi I am Expert In JAVA I can do your work Thank You :-)

$25 USD in 3 dias
(4 Comentários)

Hi I a software engineer and expert in Web development development Expert CSS,HTML/HTML5,JQuery,AJAX,javascript I have worked in Frameworks for reference you can view my portfolio I asure you for the 100% comp Mais

$25 USD in 0 dias
(1 Comentário)

A proposal has not yet been provided

$12 USD in 2 dias
(0 Comentários)

A proposal has not yet been provided

$10 USD em 1 dia
(0 Comentários)

A proposal has not yet been provided

$14 USD em 1 dia
(0 Comentários)

Návrh doposud nebyl poskytnut

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