InstagramTwitterSnapChat


 
وصف

العودة   منتديات سكاو > الكليات الجامعية > منتدى كلية الحاسبات وتقنية المعلومات > المنتدى العام لكلية الحاسبات وتقنية المعلومات
التسجيل مشاركات اليوم البحث
   
   


المنتدى العام لكلية الحاسبات وتقنية المعلومات قسم خاص بالمواد العامة و الطلاب غير المتخصصين بكلية الحاسبات وتقنية المعلومات

مساعدة في برمجة 202

المنتدى العام لكلية الحاسبات وتقنية المعلومات

إضافة رد
 
أدوات الموضوع إبحث في الموضوع انواع عرض الموضوع
منتديات طلاب وطالبات جامعة الملك عبد العزيز منتديات طلاب وطالبات جامعة الملك عبد العزيز
  #1  
قديم 28-09-2012, 01:23 AM
الصورة الرمزية -Esraa-

-Esraa- -Esraa- غير متواجد حالياً

جامعي

 
تاريخ التسجيل: Sep 2012
التخصص: لسه معرفش ^_^
نوع الدراسة: إنتظام
المستوى: الثالث
الجنس: أنثى
المشاركات: 15
Talking مساعدة في برمجة 202


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


عندي هوم وورك في البرمجة 202 والتسليم يوم السبت ان شاء الله نقرتين لعرض الصورة في صفحة مستقلة

بس للاسف ماعرفت كيف يتحل نقرتين لعرض الصورة في صفحة مستقلة

// الغلط منها محاضرتها كلها كلام فاضي لا يمد للهوم وورك باي صلة :@

ممكن اللي يعررف يفيدني بطريقة وخطوات الحل واكون له من الشاكرين نقرتين لعرض الصورة في صفحة مستقلة


Problem 2:

The Harris-Benedict equation estimates the number of calories your body needs to maintain your weight if you do no exercise. This is called your basal bolic rate or BMR.

The calories needed for a woman to maintain her weight is:
BMR = 655 + (4.3 * weight in pounds) + (4.7 * height in inches) - (4.7 * age in years)

The calories needed for a man to maintain his weight is:
BMR = 66 + (6.3 * weight in pounds) + (12.9 * height in inches) - (6.8 * age in years)

A typical chocolate bar will contain around 230 calories. Write a program that allows the user to input their weight in pounds, height in inches, and age in years. The program should then output the number of chocolate bars that should be consumed to maintain one’s weight for both a woman and a man of the input weight, height, and age.

Notes:

This project gives the student practice with numerical calculations and simple input/output. For a slightly more challenging problem allow the height to be entered in feet and inches and have the program convert to inches.

1 kg = 2.2046226218487757 pounds
1 m = 39.37007874015748 inches






















Problem 3:

Many private water wells produce only 1 or 2 gallons of water per minute. One way to avoid running out of water with these low-yield wells is to use a holding tank. A family of 4 will use about 250 gallons of water per day. However, there is a “natural” water holding tank in the casing (i.e. the hole) of the well itself. The deeper the well, the more water that will be stored that can be pumped out for household use. But how much water will be available?

Write a program that allows the user to input the radius of the well casing in inches (a typical well will have a 3 inch radius) and the depth of the well in feet (assume water will fill this entire depth, although in practice that will not be true since the static water level will generally be 50 feet or more below the ground surface). The program should output the number of gallons stored in the well casing. For your reference:

The volume of a cylinder is where r is the radius and h is the height.
1 cubic foot = 7.48 gallons of water.

For example, a 300 foot well full of water with a radius of 3 inches for the casing holds about 441 gallons of water -- plenty for a family of 4 and no need to install a separate holding tank.

Notes:

This project gives the student practice with numerical calculations and simple input/output. Introduces problem solving with relatively straightforward conversion of units. Students are likely to encounter data type conversion issues from double to int and vice versa (e.g. radius / 12 will result in 0 if radius is an int).

وبس نقرتين لعرض الصورة في صفحة مستقلةنقرتين لعرض الصورة في صفحة مستقلة

 


توقيع -Esraa-  


" اللهم لآ سهل إلا ماجعلته سهلا فأنت تجعل الحزن إن شئت سهلا "نقرتين لعرض الصورة في صفحة مستقلة

" اللهم أرزقني الدرجات العليا في الدنيا والآخرة "نقرتين لعرض الصورة في صفحة مستقلةنقرتين لعرض الصورة في صفحة مستقلة

 

رد مع اقتباس

 

منتديات طلاب وطالبات جامعة الملك عبد العزيز منتديات طلاب وطالبات جامعة الملك عبد العزيز
قديم 28-09-2012, 11:44 AM   #2

Amo0ol-92

جامعي

 
تاريخ التسجيل: Jul 2010
التخصص: IS
نوع الدراسة: إنتظام
المستوى: السابع
الجنس: أنثى
المشاركات: 57
افتراضي رد: مساعدة في برمجة 202

بالنسبه للسؤال الاول يبغاك تحسبين في كم قطعة شوكلاته يقدر ياكلها الشخص بحيث انو يحافظ على وزنه ..
اول شي تطلبي من المستخدم يدخل الطول بـ inches و الوزن بـ pounds و العمر بالسنه
ثاني شي تحسبي الـBMR بحسب المعادله فوق
بعدين تقسمين BMR/230 وتحسبين كم قطعة شوكلاته ياخذ اذا كان رجال او حرمه ,,

أتمنى أكون فهمتك ,,

 

Amo0ol-92 غير متواجد حالياً   رد مع اقتباس
 

منتديات طلاب وطالبات جامعة الملك عبد العزيز منتديات طلاب وطالبات جامعة الملك عبد العزيز
قديم 28-09-2012, 12:16 PM   #3

Amo0ol-92

جامعي

 
تاريخ التسجيل: Jul 2010
التخصص: IS
نوع الدراسة: إنتظام
المستوى: السابع
الجنس: أنثى
المشاركات: 57
افتراضي رد: مساعدة في برمجة 202

هذا طبعا ً حل دكتوره غاده معانا زمان

Solution:

Problem Analysis Chart:

Given Data Required Results
weight
height
age
numCaloriesChocolateBar numChocolateBarsForFemale

Processing Required Solution Alternatives
caloriesMale= 655 + (4.3 * weight) + (4.7 * height) - (4.7 * age);
numChocolateBarsForMale = caloriesMale / numCaloriesChocolateBar

caloriesFemale = 66 + (6.3 * weight) + (12.9 * height) - (6.8 * age);
numChocolateBarsForWoman = caloriesFemale / numCaloriesChocolateBar
caloriesMale = 655 + (4.3 * weight) + (4.7 * height) - (4.7 * age);

System.out.println("A male with those measurements should eat " +
(caloriesMale / 230) + “candy bars per day to maintain her weight.");


caloriesFemale = 66 + (6.3 * weight) + (12.9 * height) - (6.8 * age);

System.out.println("A female with those measurements should eat " +
(caloriesFemale / 230) + “candy bars per day to maintain her weight.");

Algorithm:

1. Read Weight from user.
2. Read Height from user.
3. Read Age from user.
4. Calculate number of calories a male person can consume without gaining weight.
5. Calculate number of chocolate bars a male person can consumer without gaining weight.
6. Calculate number of calories a female person can consume without gaining weight.
7. Calculate number of chocolate bars a female person can consumer without gaining weight.
8. Displaynumber of calories a male person can consume without gaining weight.
9. Display number of calories a female person can consume without gaining weight.






Sample Code Solution:

import java.util.Scanner;

public class CandyCalculator
{
public static void main(String[] args)
{
Scanner keyboard = new Scanner(System.in);
int age;
int weight;
int height;

System.out.println("This program will calculate the number of 230 calorie");
System.out.println("candy bars to eat to maintain your weight.");
System.out.println("What is your age in years?");
age = keyboard.nextInt();
System.out.println("What is your total height in inches?");
height = keyboard.nextInt();
System.out.println("What is your weight in pounds?");
weight = keyboard.nextInt();

double caloriesMale, caloriesFemale;

caloriesMale = 655 + (4.3 * weight) + (4.7 * height) - (4.7 * age);
caloriesFemale = 66 + (6.3 * weight) + (12.9 * height) - (6.8 * age);

System.out.println("A female with those measurements should eat " +
(caloriesFemale / 230) +
" candy bars per day to maintain her weight.");
System.out.println("A male with those measurements should eat " +
(caloriesMale / 230) +
" candy bars per day to maintain her weight.");
}
}

 


التعديل الأخير تم بواسطة Amo0ol-92 ; 28-09-2012 الساعة 12:21 PM.
Amo0ol-92 غير متواجد حالياً   رد مع اقتباس
 

منتديات طلاب وطالبات جامعة الملك عبد العزيز منتديات طلاب وطالبات جامعة الملك عبد العزيز
قديم 28-09-2012, 12:24 PM   #4

Amo0ol-92

جامعي

 
تاريخ التسجيل: Jul 2010
التخصص: IS
نوع الدراسة: إنتظام
المستوى: السابع
الجنس: أنثى
المشاركات: 57
افتراضي رد: مساعدة في برمجة 202

السؤال الثاني بأحط لك الحل وانتِ فهميه نفسك هو سهل و واضح بس تشوفي الحل بتفهميه ان شاءالله

Solution:

Problem Analysis Chart:

Given Data Required Results
radiusInInches
depthInFeet
CUBIC_FEET_PER_GALLON = 7.48
PI = 3.14159 gallons
Processing Required Solution Alternatives
radiusInFeet = radiusInInches / 12
volumeOfWell =
galons = volumeOfWell * CUBIC_FEET_PER_GALLON = 7.48
gallons = (int) ((Math.PI * (radius / 12.0) * (radius / 12.0) * depth) * CUBIC_FEET_PER_GALLON);


Algorithm:

1. Readradius from user.
2. Read depth from user.
3. Read Age from user.
4. Convert entered radius from inches to feet.
5. Calculate volume of well.
6. Calculate number of gallons in well.
7. Display number of gallons in well.









Sample Code Solution:

Solution:

import java.util.Scanner;

public class WaterWell
{
public static final double CUBIC_FEET_PER_GALLON = 7.48;

public static void main(String[] args)
{
Scanner keyboard = new Scanner(System.in);
int radius;
int depth;
int gallons; // This could be a double, it's not specified in the problem

System.out.println("This program calculates how much water will be available in a well.");
System.out.println("What is the radius of the casing in inches?");
radius = keyboard.nextInt();
System.out.println("What is the depth of the well in feet?");
depth = keyboard.nextInt();

// Compute gallons, first converting the radius to feet, then computing the volume
// and multiplying by the conversion factor of cubic feet to gallons
gallons = (int) ((Math.PI * (radius / 12.0) * (radius / 12.0) * depth) * CUBIC_FEET_PER_GALLON);

System.out.println("The well contains " + gallons + " gallons.");
}
}

 

Amo0ol-92 غير متواجد حالياً   رد مع اقتباس
 

منتديات طلاب وطالبات جامعة الملك عبد العزيز منتديات طلاب وطالبات جامعة الملك عبد العزيز
قديم 28-09-2012, 06:00 PM   #5

-Esraa-

جامعي

الصورة الرمزية -Esraa-

 
تاريخ التسجيل: Sep 2012
التخصص: لسه معرفش ^_^
نوع الدراسة: إنتظام
المستوى: الثالث
الجنس: أنثى
المشاركات: 15
افتراضي رد: مساعدة في برمجة 202

الله يجزاكي الجنة ياارب

وييسرلك كل اموورك ان شاء الله

بس اذا انتي ماحذفتي الهوم ووركات والبحوث تقدري ترسليلي هيا نقرتين لعرض الصورة في صفحة مستقلة

 

-Esraa- غير متواجد حالياً   رد مع اقتباس
 

منتديات طلاب وطالبات جامعة الملك عبد العزيز منتديات طلاب وطالبات جامعة الملك عبد العزيز
قديم 29-09-2012, 11:08 PM   #6

Amo0ol-92

جامعي

 
تاريخ التسجيل: Jul 2010
التخصص: IS
نوع الدراسة: إنتظام
المستوى: السابع
الجنس: أنثى
المشاركات: 57
افتراضي رد: مساعدة في برمجة 202

المشاركة الأصلية كتبت بواسطة -esraa- مشاهدة المشاركة
الله يجزاكي الجنة ياارب

وييسرلك كل اموورك ان شاء الله

بس اذا انتي ماحذفتي الهوم ووركات والبحوث تقدري ترسليلي هيا نقرتين لعرض الصورة في صفحة مستقلة
آآآآمين ياااااارب ويااااك ..

وايوه ماحذفت الهوم ووركات موجوده للآن عندي ارسلت لك رساله اكاديميه ضفت فيها ايميلي ما اعرف اذا بتوصلك او لا يعني عشان فيها ايميل بس لو ماوصلت نشوف طريقه اعطيك فيها اللي تبغيه ,,,

 

Amo0ol-92 غير متواجد حالياً   رد مع اقتباس
 

منتديات طلاب وطالبات جامعة الملك عبد العزيز منتديات طلاب وطالبات جامعة الملك عبد العزيز
قديم 30-09-2012, 12:05 AM   #7

-Esraa-

جامعي

الصورة الرمزية -Esraa-

 
تاريخ التسجيل: Sep 2012
التخصص: لسه معرفش ^_^
نوع الدراسة: إنتظام
المستوى: الثالث
الجنس: أنثى
المشاركات: 15
افتراضي رد: مساعدة في برمجة 202

مشكوورة الله يعطيكي العافية يارب

الى الان ماوصلني شيء

 

-Esraa- غير متواجد حالياً   رد مع اقتباس
 

منتديات طلاب وطالبات جامعة الملك عبد العزيز منتديات طلاب وطالبات جامعة الملك عبد العزيز
قديم 01-10-2012, 08:09 PM   #8

loOok

جامعي

 
تاريخ التسجيل: Dec 2011
التخصص: ...
نوع الدراسة: إنتظام
المستوى: الرابع
الجنس: أنثى
المشاركات: 138
افتراضي رد: مساعدة في برمجة 202

انا كمان ابغى الهوم ورك الله يسعدك :)

 

loOok غير متواجد حالياً   رد مع اقتباس
 

منتديات طلاب وطالبات جامعة الملك عبد العزيز منتديات طلاب وطالبات جامعة الملك عبد العزيز
قديم 02-10-2012, 09:31 PM   #9

محبوبة الكل المملوحة

جامعي

الصورة الرمزية محبوبة الكل المملوحة

 
تاريخ التسجيل: Oct 2010
التخصص: احصاء
نوع الدراسة: إنتظام
المستوى: الرابع
الجنس: أنثى
المشاركات: 70
افتراضي رد: مساعدة في برمجة 202

السلام عليكم

يعطيك العافيه يارب ممكن ترسلين لي الواجبات وابغى اسالك كمان لما احل اسلملها الحل بخط يدي ولا لازم اطبع من البرنامج

 

محبوبة الكل المملوحة غير متواجد حالياً   رد مع اقتباس
 

منتديات طلاب وطالبات جامعة الملك عبد العزيز منتديات طلاب وطالبات جامعة الملك عبد العزيز
قديم 03-10-2012, 06:37 AM   #10

-Esraa-

جامعي

الصورة الرمزية -Esraa-

 
تاريخ التسجيل: Sep 2012
التخصص: لسه معرفش ^_^
نوع الدراسة: إنتظام
المستوى: الثالث
الجنس: أنثى
المشاركات: 15
افتراضي رد: مساعدة في برمجة 202

في اشياء مافهمتها ممكن توضيح اللي باللون الازرق ليش كتبناها



Sample Code Solution:

import java.util.Scanner;

public class CandyCalculator
{
public static void main(String[] args)
{
Scanner keyboard = new Scanner(System.in);
int age;
int weight;
int height;


System.out.println("This program will calculate the number of 230 calorie");
System.out.println("candy bars to eat to maintain your weight.");
System.out.println("What is your age in years?");
age = keyboard.nextInt();
System.out.println("What is your total height in inches?");
height = keyboard.nextInt();
System.out.println("What is your weight in pounds?");
weight = keyboard.nextInt();

double caloriesMale, caloriesFemale;

caloriesMale = 655 + (4.3 * weight) + (4.7 * height) - (4.7 * age);
caloriesFemale = 66 + (6.3 * weight) + (12.9 * height) - (6.8 * age);

System.out.println("A female with those measurements should eat " +
(caloriesFemale / 230) +
" candy bars per day to maintain her weight.");
System.out.println("A male with those measurements should eat " +
(caloriesMale / 230) +
" candy bars per day to maintain her weight.");
}
}

 

-Esraa- غير متواجد حالياً   رد مع اقتباس
 

إضافة رد


تعليمات المشاركة
لا تستطيع إضافة مواضيع جديدة
لا تستطيع الرد على المواضيع
لا تستطيع إرفاق ملفات
لا تستطيع تعديل مشاركاتك

BB code is متاحة
كود [IMG] متاحة
كود HTML معطلة

الانتقال السريع

 


الساعة الآن 05:40 PM


Powered by vBulletin® Version 3.8.9 Beta 3
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Ads Organizer 3.0.3 by Analytics - Distance Education

أن كل ما ينشر في المنتدى لا يمثل رأي الإدارة وانما يمثل رأي أصحابها

جميع الحقوق محفوظة لشبكة سكاو

2003-2023