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

ارجو منكم شرح طريقة حل هذان السؤالين

بدأه decent في 19 أكتوبر 2008 · 2 رد · 519 مشاهدة · في JavaSE
مشاركة: واتساب X فيسبوك تيليجرام
#1 صاحب الموضوع

السلام عليكم ورحمة الله وبركاتة يا اخواني الاعزاء

في الحقيقة كنت احاول في حل بعض الاسلئة المتعلقة ببرمجة بلغة الجافا.معظم الاسلئة تمكنت من حلها ولكني واجهت صعوبه في سؤالين.وحاولت ان احلهن ولكني عجرت.فقلت سوف الجأ الى اخواني لعلهم لديهم فكرة عنهما.لاني ما بدت اتعلم الجافا من فترة بسيطة واحسها لغة صعبة ومعقدة تحتاج الى معلم يدرسك. ولك جزيل الشكر مقدماا

السؤال الأول:

<H1 style="MARGIN: 12pt 0in 3pt">Program #1 – Trees</H1><H3 style="MARGIN: 12pt 0in 3pt">DETAILS</H3>Write a program with a class named Trees contains the main() method which defines String variables. These variables are used with println() statements to display a design of repeating geometric shapes to the screen. Full credit requires a printout that matches the sample.

<H3 style="MARGIN: 12pt 0in 3pt">REQUIREMENTS</H3>· One variable could be used for each printed line but you should think of a way to avoid duplicating variables with the same value! The sample used eight variables can you figure out how it was done?

· You should enlarge the “compiler output” window to have a better view of your program output and best debug it.

· The program should use no more than four “println()” statements. Though, it can all be done in one “println()” statement (Hint: think of “\n”).

السؤال الثاني:

<H1 style="MARGIN: 12pt 0in 3pt">Program #2 – Water Bill</H1><H3 style="MARGIN: 12pt 0in 3pt">DETAILS</H3>Write a program with one class named WaterBill that will prompt the user for the starting and ending readings from the water meter. DO NOT use any magic numbers (literal constants) in your expression! Any literals MUST be defined as final variables (i.e CONSTANTS). We will do this calculation in main() because you haven’t had the material concerning methods and their return values yet. Without method return values it becomes very difficult to write all but the simplest of object-oriented programs.

REQUIREMENTS:

· Initialize all variables to an initial value when you declare them.

· Use constants for all values that do not change

· The formula for calculating the water bill is:

cost = C + (gallons * U)

U represents the charge of $1.12 per 1000 gallons delivered.

C represents the minimum delivery charge of $12.00.

· The average monthly cost is the total quarterly cost divided by 3.

والله ولي التوفيق

#2

حياك الله أخوي ،،

موضوعك مخالف حاليا :) ، على العموم لضمان الأستمراريه ، عليك بوضع السؤال باللغه العربيه -لكي تضمن أكبر عدد من الأعضاء للمساعده - ، والأمر الأخر وهو الأهم عرض محاولاتك حتى نعدل عليها ونصححها اذا أحتوت على أخطاء ..

بالتوفيق ،،

http://informatic-ar.com منصة تعليمية عربية في علوم الحاسب والبرمجة

https://moalfat.com  للكتب الالكترونية والكورسات التعليمية

Everything we see now is just an engineering solution based on old science

#3

أزيد على كلام الأخ وجدي بعض الترتيب لن يضر أحداً

تحياتي

حزمة المحرك الإصدارة 0.8

أي أحد يجد أني ظلمته فليراسلني

وبإذن الله لو كان له حق سيأخذه

728x90.png

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