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

كيف أحسب مساحة دائرتين بإستخدام الجافا

مغلق
بدأه الأحمري في 12 أبريل 2007 · 1 رد · 689 مشاهدة · في JavaSE
مشاركة: واتساب X فيسبوك تيليجرام
#1 صاحب الموضوع

السلام عليكم

عندي سؤال مهم وهذا نصة بالإنجليزي

Write a program tat computes the area of a circular region (the shaded in the diagram). given the radii of the inner outer circles.ri and r0 ,respectively. we compute the area of the circular region by subtracting the area of the

Circle from the area of the outer circle. Define a Circle class that has methods

To compute the area and circumference. You set the circle's radius with the

setRadius m ethod or via a constructor.

المطلوب بإختصار حساب مساحه الدائره الكبيره ثم حساب مساحه الدائره الصغيره التي داخلها ثم طرحها من بعض

طبعا أسم الclacc هوcircle

أرجوا المساعده مشكورين

#2

About how to find circle area

This code help u to find hight width

class Circle extends Shape {
   private int radius;

   // constructor
   Circle(int newx, int newy, int newradius) {
	  super(newx, newy);
	  setRadius(newradius);
   }

   // accessors for the radius
   int getRadius() { return radius; }
   void setRadius(int newradius) { radius = newradius; }

   // draw the circle
   void draw() {
	  System.out.println("Drawing a Circle at:(" + getX() + ", " + getY() +
		 "), radius " + getRadius());
   }
}

All u have to do is culc Circle area

For circle 1 and 2

Than Total Area = Area2 - Area1

Note:

ِCircle Area = 3.14 * red* red

تم تعديل هذه المشاركة بواسطة yadoo86 في 13 أبريل 2007 في 22:42

winter-main.jpg

6179.gif

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

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

عدد الزوار حالياً

المتواجدون خلال آخر دقيقتين · يتحدّث كل ٣٠ ثانية

—الإجمالي—أعضاء مسجّلون—زوار بدون تسجيل

جارٍ التحقق من المتواجدين…