AOU حل جميع الواجبات ومشاريع التخرج لجميع الفروع والتخصصات AOU
حلول مضمونة وغير مكررة لجميع الواجبات
 
مدرسين خصوصيين – ملخصات هامة مجانية لجميع المواد
خدماتنا لجميع فروع الجامعة ولجميع الأقسام الدراسية
 
واتس اب 00963957547725
mustafaalbeda@hotmail.com
AOU حل جميع الواجبات ومشاريع التخرج لجميع الفروع والتخصصات AOU
حلول مضمونة وغير مكررة لجميع الواجبات
 
مدرسين خصوصيين – ملخصات هامة مجانية لجميع المواد
خدماتنا لجميع فروع الجامعة ولجميع الأقسام الدراسية
 
واتس اب 00963957547725
mustafaalbeda@hotmail.com
AOU حل جميع الواجبات ومشاريع التخرج لجميع الفروع والتخصصات AOU
هل تريد التفاعل مع هذه المساهمة؟ كل ما عليك هو إنشاء حساب جديد ببضع خطوات أو تسجيل الدخول للمتابعة.

AOU حل جميع الواجبات ومشاريع التخرج لجميع الفروع والتخصصات AOU

AOU حلول مضمونة وغير مكررة لجميع الواجبات ومشاريع التخرج AOU
 
الرئيسيةالرئيسية  أحدث الصورأحدث الصور  التسجيلالتسجيل  دخولدخول  
واتس اب-موبايل 00963957547725 -mustafaalbeda@hotmail.com

Instagram


 

  1 M180: Data Structure and Algorithms in Java Tutor-Marked Assignment (Fall 2015/2016) Cut-Off Date: Total Marks: 40 Contents Warnings and Declaration………………………………………………………………………………..1 Question 1……………..……………………….………………………………………………………….2 Que

اذهب الى الأسفل 
كاتب الموضوعرسالة
WhatsApp-00963951432013
Admin
WhatsApp-00963951432013


عدد المساهمات : 2429
نقاط : 302124
السٌّمعَة : 4
تاريخ التسجيل : 20/09/2008
العمر : 54
الموقع : www.aoua.123.st

  1    M180: Data Structure and Algorithms in Java   Tutor-Marked Assignment (Fall 2015/2016)   Cut-Off Date:    Total Marks: 40  Contents  Warnings and Declaration………………………………………………………………………………..1  Question 1……………..……………………….………………………………………………………….2  Que Empty
مُساهمةموضوع: 1 M180: Data Structure and Algorithms in Java Tutor-Marked Assignment (Fall 2015/2016) Cut-Off Date: Total Marks: 40 Contents Warnings and Declaration………………………………………………………………………………..1 Question 1……………..……………………….………………………………………………………….2 Que     1    M180: Data Structure and Algorithms in Java   Tutor-Marked Assignment (Fall 2015/2016)   Cut-Off Date:    Total Marks: 40  Contents  Warnings and Declaration………………………………………………………………………………..1  Question 1……………..……………………….………………………………………………………….2  Que I_icon_minitimeالأربعاء نوفمبر 11, 2015 3:24 am


1
M180: Data Structure and Algorithms in Java
Tutor-Marked Assignment (Fall 2015/2016)
Cut-Off Date:
Total Marks: 40
Contents
Warnings and Declaration………………………………………………………………………………..1
Question 1……………..……………………….………………………………………………………….2
Question 2 ………………..…………………………………………………………………………….….3
Question 3 ………….………..………………………………………………………………………….….4
Question 4 ………….…………..……………………………………………………………………….….4
Question 5 ………….…………..……………………………………………………………………….….4
Plagiarism Warning:
As per AOU rules and regulations, all students are required to submit their own TMA work and avoid plagiarism. The AOU has implemented sophisticated techniques for plagiarism detection. You must provide all references in case you use and quote another person's work in your TMA. You will be penalized for any act of plagiarism as per the AOU's rules and regulations.
Declaration of No Plagiarism by Student (to be signed and submitted by student with TMA work):
I hereby declare that this submitted TMA work is a result of my own efforts and I have not plagiarized any other person's work. I have provided all references of information that I have used and quoted in my TMA work.
Name of Student:………………………………..
Signature:…………………………………………...
Date:……………………………………………………
Arab Open University

2
Question 1: (10 marks)
Given the following method:
public void guessIt(Stack s, int[] arr1, int[] arr2){ Stack s1=new Stack(); Queue myQueue=new Queue(); int i=0, j=0; while(!s.isEmpty()){ int x=s.pop(); if(x%3==0) arr1[i++]=x; if(x%5==0) arr2[j++]=x; s1.push(x); } while(!s1.isEmpty()) myQueue.enqueue(s1.peek()); s.push(2*s1.pop()); }
Consider that the arrays were initially empty, and the initial state of the stack was as follows: 15 30 12 11 9 20 0 2 s
a- What will be the elements of arr1 after executing the code? b- What will be the elements of arr2 after executing the code? c- Draw the stack s after executing the code. d- Draw the queue myQueue after executing the code, indicating Front and Rear.

3
Question 2: (11 marks)
You are given a Node class and a List class: public class Node { int data; Node next;
}
public class List { Node first; }
Given an array myArray and a linked list myList depicted in the following diagrams.
myArray
A- Write a code that takes the array and the list as arguments, and fills the first five nodes in the list with the first five positive numbers in the array using a proper loop.
B- Draw the List after applying the code.
C- Draw the Final shape of the List after applying the code and the following statements as well:
Node p=first.next.next.next;
p.next.next.data= myArray[11];
p.next.next.next=first;
myArray[0]
myList

4
Question 3: (6 marks) : For the following method findBigO:
a) Determine the step count of each line in this method (fill in the ??? places) b) Find the Total of the total steps (T) c) Deduce , at the end , the final time complexity (Big-O notation) .
Statement
Total Steps/ line public static void findBigO(int [] x, int n) ??? { 0 for (int i = 0; i < n; i += 2) ??? x[i] += 2; ??? int i = 1; ??? while (i <= n/2) ??? { 0 x[i] += x[i+1]; ??? i++; ??? } 0 } ??? Total T
Question 4: (8 marks)
Write a Java method that takes a Stack myStack as an argument. The method should empty the stack and fill its elements in a doubly linked list myList , and returns this list.
N.B: Use header in your method. Question 5: (5 marks) Given the code below, that includes a recursive method:
class recursion { public static int func (int n) { int result; result = func (n - 1); return result; } } class Output { public static void main(String args[]) { recursion obj = new recursion() ; System.out.print(obj.func(12)); } } a) Run the given code on your computer, and provide a screenshot to display the result. b) Why do you think the output was like that? End of Assessment
الرجوع الى أعلى الصفحة اذهب الى الأسفل
http://www.aoua.123.st
 
1 M180: Data Structure and Algorithms in Java Tutor-Marked Assignment (Fall 2015/2016) Cut-Off Date: Total Marks: 40 Contents Warnings and Declaration………………………………………………………………………………..1 Question 1……………..……………………….………………………………………………………….2 Que
الرجوع الى أعلى الصفحة 
صفحة 1 من اصل 1
 مواضيع مماثلة
-
» 1 M180: Data Structure and Algorithms in Java Tutor-Marked Assignment (Spring 2015/2016) Cut-Off Date: April 30th, 2016 Total Marks: 40 Contents Warnings and Declaration………………………………………………………………………………..1 Question 1……………..……………………….………………………………………………………….2
» 1 M180: Data Structure and Algorithms in Java Tutor-Marked Assignment (Spring 2015/2016) Cut-Off Date: April 30th, 2016 Total Marks: 40 Contents Warnings and Declaration………………………………………………………………………………..1 Question 1……………..……………………….………………………………………………………….2
» 1 T324: Keeping ahead in ICTs Tutor-Marked Assignment, Fall 2015 2016 Cut-Off Date: 14/12/2015 Total Marks: 100 Question 1 (30 marks)………………………………………………………………2 Question 2 (30 marks)………………………………………………………………2 Question 3 (40 marks)………………
» 1 T324: Keeping ahead in ICTs Tutor-Marked Assignment, Fall 2015 2016 Cut-Off Date: 14/12/2015 Total Marks: 100 Question 1 (30 marks)………………………………………………………………2 Question 2 (30 marks)………………………………………………………………2 Question 3 (40 marks)………………
»  Faculty of Computer Studies T103: Computer Organization and Architecture Fall 2015 2016 Tutor Marked Assignment Cut-off Date: Dec 16, 2015 Total Marks: 40 Contents Mark Question 1 ­-----------------------------------------------

صلاحيات هذا المنتدى:لاتستطيع الرد على المواضيع في هذا المنتدى
AOU حل جميع الواجبات ومشاريع التخرج لجميع الفروع والتخصصات AOU :: حلول واجبات 2016 الفصل الصيفي AOU(يشاهدة الآن 3537 زائر)-
انتقل الى: