الفريق العربي للبرمجةأرشيف المنتديات · 2000 – 2023
نسخة أرشيفية للقراءة فقط — التسجيل والمشاركة مغلقان، والمحتوى محفوظ كما كان.

[مخالف - طلب حل : ]مســــــــــــاعدة

مغلق
بدأه ^sweet java ^ في 21 أكتوبر 2010 · 2 رد · 442 مشاهدة · في JavaSE
مشاركة: واتساب X فيسبوك تيليجرام
#1 صاحب الموضوع

مســــــــاء الخيــــــر

انا مطلوب مني برنامج بخصوص object -oriented prohramming with java

واتمنى المســــــاعدة

In writing the code of the below methods you can use the Frog methods in table1

Message Frog

left() Move one stone to the left.

right() Move one stone to the right

home() Move to position 1

jump() Jump up and return to its position

setPosition(int) Set position attribute to argument value.

setColour(OUColour) Set colour attribute to argument value

i) Assume an interface called Dancer is defined as follows:

public interface Dancer

{

public void danceSteps(int n);

}

Write a class called DancerFrog that inherits Frog class and implements Dancer interface

The DancerFrog class has no attributes but it has the following members

A DancerFrog constructor that invokes parent constructor for initialization.

getReady(): is a helper method that takes no argument and returns no values. In this method the DancerFrog instance should be in red colour and should stand on position

Note that: a helper method is a private method not public.

danceSteps(int n): the DancerFrog instance should invoke getReady(). Then the following steps should be repeated number of times according to argument n: move right twice, jump, and finally move left

home(): the DancerFrog instance override the inherited method home() such that in addition to return back frog to position 1, it returns back its colour to green

#2

اين محاولتك.....

ضع المحاولة حتى لو كود بسيط جداااااااااااااااا

00020309t.gif

1958_1963.gif
#3

الأخ الكريم/الأخت الكريمة

السلام عليكم ورحمة الله وبركاته.

مرحباً بكم في منتدى الفريق العربي للبرمجة

تأسف إدارة المنتدى لغلق الموضوع وذلك لمخالفته قوانين المشاركات، فقرة طلب حل الواجبات والتمارين.

قواعد طرح المشاركات

/index.php?showtopic=29343

شاكرين لكم حُسن تعاونكم

هذا الموضوع مغلق.

مواضيع مشابهة