منتدى طلاب وطالبات الجامعة السعودية الإلكترونية

منتدى طلاب وطالبات الجامعة السعودية الإلكترونية (https://www.alseu.com/)
-   CS 141 (https://www.alseu.com/f79/)
-   -   الواجب التاني جافا 2 (https://www.alseu.com/t19869/)

فاطمية 27-02-2016 11:05 PM

الواجب التاني جافا 2
 
1 مرفق
الهمة الهمة الفزعة الفزعة الحقونا اسعفونا جزاكم الله خيرا

والله العظيم نذاكر ولا نحل لا حول ولا قوة الا بالله وحسبنا الله ونعم الوكيل

turkisaad 28-02-2016 11:00 AM

الله يعين على الجافا بس هانت ان شاء الله

ahmedsh88 28-02-2016 02:50 PM

ياليت اللي يعرف طريقة حل هذا السؤال يقول لنا الطريقة والله يوفقنا بالاختبار
Q2. (0.5 points) Calculate the Big Oh performance for the following:

Given that an Array of size n=10 takes 3 seconds to search, how long does it take a search Array of
size n=100? (a)Linear Search of an array of size n=100 Given O(n)


(b) Merge Sort performance of an array is O(nlog(n)), given that an Array of size n=10 takes 3
seconds to sort,
how long does it take to sort an Array of size n=100?

abo mohamed 28-02-2016 10:12 PM

السلام عليكم

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

تعقيد

Saimon 28-02-2016 11:47 PM

1 مرفق
اقتباس:

المشاركة الأصلية كتبت بواسطة ahmedsh88 (المشاركة 125420)
ياليت اللي يعرف طريقة حل هذا السؤال يقول لنا الطريقة والله يوفقنا بالاختبار
q2. (0.5 points) calculate the big oh performance for the following:

Given that an array of size n=10 takes 3 seconds to search, how long does it take a search array of
size n=100? (a)linear search of an array of size n=100 given o(n)


(b) merge sort performance of an array is o(nlog(n)), given that an array of size n=10 takes 3
seconds to sort,
how long does it take to sort an array of size n=100?


هذا الحل ,,, بالتوفيق

ahmedsh88 29-02-2016 12:08 AM

اقتباس:

المشاركة الأصلية كتبت بواسطة saimon (المشاركة 125452)
هذا الحل ,,, بالتوفيق

جزاك الله خير اهم شي عرفت الطريقة لان احتمال كبير هذا السؤال يجي في المدتيرم

abo mohamed 29-02-2016 12:20 AM

"> Q4. (2 points) Write a program where you use Selection Sort to sort the following array in ascending order.
24,2,45,20,56,75,2,56,99,53,12 a) Declare an array of integers called unsortedarr and load it with the integers above. Notice we have 11 numbers, and the number 2 is repeated which is fine. Display the array as it is by printing it before the sort. b) Sort the array using the insertion sort technique and display the array after you sort it. Here is the beginning of the code, complete it, run it, test it, submit it.
import java.util.*;
public class MySelectSort **
public static void main(String[] args) **
int arr[] = **24,2,45,20,56,75,2,56,99,53,12**;
System.out.println("--------------------------
- unsorted");
System.out.println(arr);
// continue … write your code

طيب وهذا من يتكرم ويشرحه لنا

turkisaad 01-03-2016 05:10 PM

حل السؤال الأخير
 
1 مرفق
هذا حل الكود الأخير بس ياليت يتم تغيير أسماء المتغيرات عشان الكل ياخذ درجة السؤال كامله
وبالتوفيق للجميع ....

الحل بالمرفقات

توج 11-03-2016 09:28 PM

اقتباس:

المشاركة الأصلية كتبت بواسطة turkisaad (المشاركة 125598)
هذا حل الكود الأخير بس ياليت يتم تغيير أسماء المتغيرات عشان الكل ياخذ درجة السؤال كامله
وبالتوفيق للجميع ....

الحل بالمرفقات

شكراااااااااااااا
طيب ممكن تحل لي هالسؤال ؟؟؟

1- Create two classes; The first called: StudentData, and the second called: CSStudents )
2- The classes are created to provide the structure for three objects of students st1, st2, and st2.
3- Class StudentData defines :
• Four of private attributes called (studentID, studentName, courseMark, numberOfHoursInCourse). These attributes have no initialization.
• Two of public attributes called (courseGradeNumberOfFive, courseGradeLetterOfFive). These attributes have no initialization.
• One Behavior called ( calculateGPA ): To calculate the point of the GPA of 5 for a provided course.
3- Class CSStudents defines :
• Three private attributes called (courseName, numberOfHoursInCourse, courseMark).
• Two public attributes called (courseGradeLetterOfFour, courseGradeNumberOfFour ).
• One Behavior called ( calculateGPA) To calculate the point of the GPA of 4 for a provided course, also it implements the function to calculate the Grade for the point of 5 and the point of 4 as well.
4- Show the ability of the constructor for overloading by using two constructors:
• One to initialize studentID, studentName.
• One to initialize studentID, studentName, courseName, courseMark, numberOfHoursInCourse

6- Show the advantage of the overriding in providing its specific implementation of calculateGPA method in class CSStudents , that is already provided by class StudentData.
7- Implement the three objects from the second class.
8- Display the structure for three objects from the main class to get as same as output below.
9- You may need more instance methods to complete your homework.
10- You may need more Overriding methods to complete your homework.
11- Provide your code and the implementation in Java code.

KaLeeMaT_2 12-03-2016 04:46 AM

Q1. (0.5 point) (a)Write the java code for doing a Linear Search on the array given below. Write your code in the space below, (no need to submit .java file)

(b) What would your search method return if we asked to search for the number 2 and return it’s index position?

[24][2][45][20]56][75][2][56][99][53][12]

الي عنده الحل او طريقة الحل الله لايهينه ينزله
التسليم اليوم بيقفل


الساعة الآن 09:14 AM

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.6.1 TranZ By Almuhajir

Security team