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

مساعده في كود الى score

مغلق
بدأه Born2Die في 10 ديسمبر 2004 · 3 رد · 470 مشاهدة · في JavaSE
مشاركة: واتساب X فيسبوك تيليجرام
#1 صاحب الموضوع

كيف اعمل هذا الكود حاولت فيه ولكن يعطيني 14 ايررور

 General
At the University of Poppleton student feedback on modules is achieved using a questionnaire. For each question students are asked to record an integer value in the range 1 to 5 with 1=Poor, 2=Fair, 3=Average, 4=Good, 5=Excellent. For each question an average mark is computed, and a histogram produced showing the number of 1s, number of 2s, etc. 
Task
Write a method that reads in an collection of integer scores from the keyboard, with each score in the range 1-5, output the average, rounded to 1 decimal place, and draw a histogram of the mark distribution using rows of asterisks. 
For example, if the scores returned are {3, 4, 2, 3, 3, 3, 4, 3, 3, 3, 4, 1, 1, 4}, the average is 41/14=2.9. There are 2 scores of 1, 1 score of 2, 7 scores of 3, 4 scores of 4, and 0 scores of 5. Hence the histogram (drawn sideways) is 
**
*
*******
****

To solve this problem you are recommended to provide the following methods: 
·	a method that takes an integer value as a parameter and outputs that number of asterisks 
·	a method that takes an array of integers and returns the average, as a floating-point number 
·	a method that takes a floating-point number as a parameter and outputs that number rounded to one decimal place 

_________________________________________

ارسل المحاولة هنا

تم تعديل هذه المشاركة بواسطة مجدي محمود في 10 ديسمبر 2004 في 10:23

#2

احاول ان اضيف ملفات الجافا لايقبل

#3

سوي كوبي بيست للكود

وحطه هنا بين علامتين

الكود

[\code]

عشان الشباب هنا لديهم قوانين انه لازم تحاول

تحياتي

والسلام ختام

لا بد من صنعاء وان طال السفر

#4
اقتباس
عشان الشباب هنا لديهم قوانين انه لازم تحاول

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

لست متواجد بشكل يومي

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

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