WhatsApp-00963951432013 Admin
عدد المساهمات : 2429 نقاط : 302124 السٌّمعَة : 4 تاريخ التسجيل : 20/09/2008 العمر : 54 الموقع : www.aoua.123.st
| موضوع: M105-TMA Cut-off date: Sunday, December 13, 2015 Student Name Student ID Section Signature: Date: Question One: [10 marks] a. Write a Java class (program) that reads from the user a real number represents the length of the hypotenuse of an isosc الأربعاء نوفمبر 11, 2015 3:07 am | |
| M105-TMA Cut-off date: Sunday, December 13, 2015 Student Name Student ID Section
Signature: Date: Question One: [10 marks] a. Write a Java class (program) that reads from the user a real number represents the length of the hypotenuse of an isosceles right triangle. Then calculates and prints the area of this triangle (rounded to 2 decimal places). [9 marks] Remove this text, and copy the complete code of your class (Q1_yourID) from NetBeans and paste it here. b. Give the exact output of your application. Provide 1 snapshot representing the exact output of any values from your choice. [1 mark] The required snapshot:
Question Two: [24 marks] a. Write a Java application that reads from the user 3 integers represent the values of the coefficients of a quadratic equation (a, b and c). Then computes and prints how many real solutions for the given equation. [20 marks] Remove this text, and copy the complete code of your class (Q2_yourID) from NetBeans and paste it here. b. Give the exact output of your application. Give 4 snapshots representing the exact output of 4 different cases (i.e., when the number of real solutions is 0, 1, 2 and when the user enters 0 as the value of a). [4 marks] Snapshot no. 1
Snapshot no. 2
Snapshot no. 3
Snapshot no. 4
Question Three: [21 marks] a. Write a Java program that reads from the user 6 lines of input. Each line includes 2 integers: a score and number of students who got this score. The program should compute and print the mode of students' scores. [19 marks] Remove this text, and copy the complete code of your class (Q3_yourID) from NetBeans and paste it here. b. Give the exact output of your program. Provide 2 snapshots representing the exact output of any values from your choice. [2 marks] Snapshot no. 1
Snapshot no. 2
Question Four: [25 marks] a. Write a Java program that read your first name and the first names of your friends. Then the program should compute and prints the percentage of your friends whose first names start with the same letter as your first name (rounded to 2 decimal places). [24 marks] Remove this text, and copy the complete code of your class (Q4_yourID) from NetBeans and paste it here. b. Give the exact output of your application. Provide a snapshot representing the exact output of any values from your choice. [1 mark] The required snapshot:
| |
|