إنضمامك إلي منتديات استراحات زايد يحقق لك معرفة كل ماهو جديد في عالم الانترنت ...

انضم الينا
استراحات زايد الصفحة الرئيسية

         :: حول الألعاب وطرق تنزيلها (آخر رد :محمد العوضي)       :: افضل قهوجيين بالرياض 30% خصم | (آخر رد :layansherief)       :: رؤية القطط في المنام للمتزوجة لابن سيرين (آخر رد :نوران نور)       :: افضل شركة تركيب ستائر الكويت بخصم 13% | دليل شقردي (آخر رد :layansherief)       :: تفسير حلم المرايا (آخر رد :نوران نور)       :: افضل فني صباغ جدران بالكويت بخصم 20% | دليل شقردي (آخر رد :layansherief)       :: شركة شراء اثاث مستعمل بالكويت بأعلى سعر | دليل شقردي (آخر رد :layansherief)       :: طيب العود في المنام (آخر رد :نوران نور)       :: كراتين نقل العفش الكويت بخصم 20% من دليل شقردي (آخر رد :layansherief)       :: المحامية رباب المعبي : حكم لصالح موكلنا بأحقيتة للمبالغ محل الدعوى (آخر رد :عمران بحر)      

إضافة رد
 
LinkBack أدوات الموضوع انواع عرض الموضوع
  #1  
قديم 04-16-2013, 04:40 PM
عضو ماسي
بيانات محروم.كوم
 رقم العضوية : 503
 تاريخ التسجيل : Dec 2007
الجنس : female
علم الدوله :
 المشاركات : 2,100,612
عدد الـنقاط :3341
 تقييم المستوى : 2139

Information Technology and Computing Program
M105 Tutor-Marked Assignment
Question One:
a. Write a Java class (program) that reads from the user the temperature in degrees Celsius as a real number. Then calculates and prints the equivalent temperature in degrees Fahrenheit (rounded to 1 decimal place).
b. Give the exact output of your program. Provide a snapshot representing the exact output of any value from your choice.
Hint:
Question Two:
a. Write a Java application that reads from the user three integers represent the lengths of three sides. Then checks if the three sides can form a triangle or not; and if they can, the application should also checks if the formed triangle is a right triangle or not.
b. Give the exact output of your application. Provide 3 snapshots representing the exact output of 3 different cases (i.e., the integers cannot form a triangle, can form a triangle but not a right one, or can form a right triangle).
Hints:
Request from the user to enter the three sides from the shortest to the longest.
Do not use the method Math.pow(). It will not give accurate results.
Read about “the triangle inequality" in any algebraic geometry book, or search the internet in order to know when the lengths of three sides can form a triangle.
Read about “the Pythagorean theorem" in any algebraic geometry book, or search the internet in order to know how to determine if a triangle is a right triangle or not.
Question Three:
a. The following code includes 10 errors (an error per line). Find these errors and classify them as a compilation error, a fatal logical error or a non-fatal logical error.
public class Q3_StudentID {
public static void main(String[] args) {
int x, y, my Num = 0;
double d = 10 + x; x = 3;
y = d + 2;
if (! x>5)
System.out.println('Result1 = ' + x);
Else
System.out.printIn("Result1 = " + y);
System.out.println("Result2 = %d" + myNum);
System.out.println("Result3 = " + x / myNum); myNum++;
System.out.printf("Result4 = %.0f\n" + d);
} // end main method
} // end Class Q3_StudentID
b. Rewrite the above code after correcting the errors.
c. Provide a snapshot representing the exact output after correcting the code.
d. Give the exact output of the following program.


import java.util.Scanner;
public class Q3_D {
public static void main(String[] args) {
int a = 4, b = 7, c;
System.out.println("Sum = " + a + b);
c = 5;
do {
System.out.printf("c = %-9d" , c);
if (c-- == 3)
break;
System.out.printf("OK\n" , c);
} while (c > 0);
double d = (c == 3) ? 1.5 : 2.5;
System.out.printf("d = %.2f\n", d);
double f = 6 + 3 / 2;
System.out.printf("f = %.2f\n", f);
if (a > b);
System.out.println("Done");
} // end main method
} // end class Q3_D


Question Four:
a. Giving the following triangle for the number 4: 4 3 2 1 4 3 2 4 3 4 Write a Java application that reads from the user a positive integer. Then displays on the screen a similar triangle which depends on that integer, using tabs to separate numbers in the same line.
b. Give the exact output of your application. Provide 2 snapshots representing the exact output of 2 different values.
Question Five:
a. Write a Java application that does the following:
• Reads an integer from the user represents the number of the students in a class.
• Reads the scores of the students from the user (the user should enter the scores in one line separated by spaces).
• Calculates and prints the average of the passed students (rounded to 2 decimal places).
• Calculates and prints the number of the students whose scores are more than the average of the passed students.
b. Give the exact output of your application. Provide 2 snapshots representing the exact output of 2 different inputs.
Hints:
• Assume that the scores of the students are integers between 0 and 100 (inclusive)
• Assume that there is at least one passed student in the class
• The student considered to be “passed” if his/her score is greater than or equal to 50.


Sample Input: Enter the number of the students in the class: 5 Enter the scores of the 5 students: 90 80 40 60 70
Sample Output: The average of the passed students is: 75.00 There are 2 students whose scores are more than the average of the passed students.
Question Six:
a. Write a Java method called distance that calculates the distance between 2 points in the xy coordinate system. The method takes 4 integers x1 , y1,x2 and y2 as arguments which represent the x and y coordinates of the 2 points, respectively. Then it calculates and returns the distance as a real number according to the following formula:
b. Include your method into a Java program that reads a sequence of inputs. Each input consists of 4 integers represent the x and y coordinates of 2 points in the xy coordinate system in the following order: x1 , y1,x2 then y2 The program invokes (calls) the method distance and prints the result for each input (rounded to 2 decimal places). The user could stop the program via entering the value 0 for all the coordinates. At the end, the program should prints the longest calculated distance (rounded to 2 decimal places).
c. Give the exact output of your program. Provide a snapshot representing the exact output of a sequence of at least 3 inputs before the user enters the value 0 for all the coordinates.
Sample Input and Output: To halt the program, enter 0 for all the coordinates The coordinates of any point should be separated by a single space ------------------------------------------------------------------ Enter the x and y coordinates of the first point: 1 1 Enter the x and y coordinates of the second point: 1 3 The distance between (1,1) and (1,3) is 2.00 Enter the x and y coordinates of the first point: 2 3 Enter the x and y coordinates of the second point: 6 7 The distance between (2,3) and (6,7) is 5.66 Enter the x and y coordinates of the first point: 0 0 Enter the x and y coordinates of the second point: 4 5 The distance between (0,0) and (4,5) is 6.40 Enter the x and y coordinates of the first point: 0 0 Enter the x and y coordinates of the second point: 0 0 ------------------------------------------------------------------ The longest calculated distance is: 6.40



حل واجب M105 قبل التسليم 00966544321455 بدون تكرار 0544321455 [email protected]
حل واجب M105 قبل التسليم 00966544321455 بدون تكرار 0544321455 [email protected]
حل واجب M105 قبل التسليم 00966544321455 بدون تكرار 0544321455 [email protected]
حل واجب M105 قبل التسليم 00966544321455 بدون تكرار 0544321455 [email protected]
حل واجب M105 قبل التسليم 00966544321455 بدون تكرار 0544321455 [email protected]
حل واجب M105 قبل التسليم 00966544321455 بدون تكرار 0544321455 [email protected]
حل واجب M105 قبل التسليم 00966544321455 بدون تكرار 0544321455 [email protected]

حل واجب M105 قبل التسليم 00966544321455 بدون تكرار 0544321455 [email protected]
__DEFINE_LIKE_SHARE__
رد مع اقتباس
إضافة رد

مواقع النشر (المفضلة)


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

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


المواضيع المتشابهه
الموضوع كاتب الموضوع المنتدى مشاركات آخر مشاركة
حل واجب M256 قبل التسليم 00966544321455 بدون تكرار 0544321455 [email protected] محروم.كوم منتدى أخبار المواقع والمنتديات العربية والأجنبية 0 04-16-2013 04:40 PM
حل واجب M255 قبل التسليم 00966544321455 بدون تكرار 0544321455 [email protected] محروم.كوم منتدى أخبار المواقع والمنتديات العربية والأجنبية 0 04-16-2013 04:40 PM
حل واجب M150a قبل التسليم 00966544321455 بدون تكرار 0544321455 [email protected] محروم.كوم منتدى أخبار المواقع والمنتديات العربية والأجنبية 0 04-16-2013 04:40 PM
حل واجب M150b قبل التسليم 00966544321455 بدون تكرار 0544321455 [email protected] محروم.كوم منتدى أخبار المواقع والمنتديات العربية والأجنبية 0 04-16-2013 04:40 PM
حل واجب M359 قبل التسليم 00966544321455 بدون تكرار 0544321455 [email protected] محروم.كوم منتدى أخبار المواقع والمنتديات العربية والأجنبية 0 04-16-2013 04:40 PM


الساعة الآن 04:38 PM


Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.5.2 TranZ By Almuhajir

RSS RSS 2.0 XML MAP HTML