العودة   منتديات طلاب الجامعة العربية المفتوحة > منتدى كليات الجامعة العربية المفتوحة > منتدى تقنية المعلومات والحاسوب > M180=M211

إضافة رد
 
أدوات الموضوع انواع عرض الموضوع

قديم 30-03-2012, 10:35 PM   #1
نزوف نزوف غير متصل
طالب فضي
افتراضي اسئله من الدكتور تحتاج لحل


2012/3/30 Mr. Zakraya Hasan <z.alhasan@arabou.edu.sa>
solve below question and send me your answers

1)
what is the difference between :
- class and struct
- forword and backward linked list

2)
explain the parts of classes?

3)
list basic operations of linked list?

4)
choose correct answer
- Consider the following declarations:
class xClass
{
public:
void func();
void print() const;
xClass ();
xClass (int, double);
private:
int u;
double w;
};
xClass x;
a. How many members does class xClass have ?
b. How many private members does class xClass have?
c. How many constructours does class xClass have?
Choose one answer.


a. a. 2 b. 2 c. 2
b. a. 1 b. 2 c. 2
c. none of the options is correct.
d. a. 6 b. 2 c. 2

- control structures: uses looping to repeat a set of statements
Choose one answer.
a. Iterative

b. Recursive

c. None is correct

d. switching


-Every node in the linked list except the _______ node contains the address of the next node
Choose one answer.
a. First

b. Last

c. Middle

d. All


-The statement (*studentPtr).gpa = 3.9; is equal to
Choose one answer.
a. studentPtr->gpa != 3.9;
b. studentPtr->gpa = 3.9;
c. studentPtr->gpa >3.9;
d. studentPtr->gpa <3.9;


-Given the declaration
int num = 6;
int *p = &num;
which of the following statements increment the value of num?
(Choose all that apply)
a. p++;
b. (*p)++;
c. num++ ;
d. (*num)++;

Suppose that intList is a list container and
intList = {3, 23, 23, 43, 56, 11, 11, 23, 25}
After the following statement executes, what will be the content of intList:
intList.unique();
Choose one answer.

a. {3, 23, 43, 56, 11, 23, 25}
b. {3, 23, 43, 56, 11, 25}
c. {3, 11, 23, 25, 43, 56}
d. {3, 11, 43, 25, 43, 56}



5)
define the inheritence OOD, Destructor , algorithem?

6)
write 2 different codes for inserting items in linked list

7)
write the code for deleting item from linked list

8)
what is ADT?



Good luck





هذه اسئله من الدكتور جاوبوا عليها وارسوله له


ترى بالبريد موجوده
نزوف غير متصل   رد مع اقتباس
قديم 31-03-2012, 12:14 AM   #2
لعبة طفل لعبة طفل غير متصل
طالب فضي
 
الصورة الرمزية لعبة طفل
افتراضي رد: اسئله من الدكتور تحتاج لحل


هذا حلي والله اعلم



1)
what is the difference between :
- class and struct
class

all members of a class are private by default



struct
all members of the struct are private by default

- forword and backward linked list

Forward
The newnode is always inserted at the end of the linkedlist

used three pointers
a-pointer points to the first node
b-pointer points to the last
c-one to create the newnode


backwards
a new node is always inserted at the beginning of the linked list no need for last pointer
needs two pointers
one to points to the list(the first)
and one to create the newnode
2)
explain the parts of classes?



Variables, functions

3)
list basic operations of linked list?
initialize the list
Destroy the list
Insert an item
Delete an item
****** for a particular item
Print the list
Make a copy of the list
Find the length of the list



4)
choose correct answer
- Consider the following declarations:
class xClass
{
public:
void func();
void print() const;
xClass ();
xClass (int, double);
private:
int u;
double w;
};
xClass x;
a. How many members does class xClass have ?

6
void func();
void print() const;
int u;
double w;
xClass ();
xClass (int, double);


b. How many private members does class xClass have?
two members
int u;
double w;

c. How many constructours does class xClass have?
2 constructors
Choose one answer.


a. a. 2 b. 2 c. 2
b. a. 1 b. 2 c. 2
c. none of the options is correct.
d. a. 6 b. 2 c. 2

- control structures: uses looping to repeat a set of statements
Choose one answer.
a. Iterative
b. Recursive
c. None is correct
d. switching


-Every node in the linked list except the _______ node contains the address of the next node
Choose one answer.
a. First
b. Last
c. Middle
d. All

-The statement (*studentPtr).gpa = 3.9; is equal to
Choose one answer.
a. studentPtr->gpa != 3.9;
b. studentPtr->gpa = 3.9;
c. studentPtr->gpa >3.9;
d. studentPtr->gpa <3.9;


-Given the declaration
int num = 6;
int *p = &num;<<the address of num
which of the following statements increment the value of num?
(Choose all that apply)
a. p++;
b. (*p)++;
c. num++ ;
d. (*num)++;

Suppose that intList is a list container and
intList = {3, 23, 23, 43, 56, 11, 11, 23, 25}
After the following statement executes, what will be the content of intList:
intList.unique();
Choose one answer.

a. {3, 23, 43, 56, 11, 23, 25}
b. {3, 23, 43, 56, 11, 25}
c. {3, 11, 23, 25, 43, 56}
d. {3, 11, 43, 25, 43, 56}



5)
define the inheritence OOD, Destructor , algorithem?

Inheritance:the ability to create a data type from existing data type
OOD: creating object and identifying how do they interact with each others
Destructor:is afunction dose not have a type,one per a class with no parameters
Algorithem:step by step procedure for solving problem in a finite set of time
6)
write 2 different codes for inserting items in linked list
by using one pointer
newnode->link=p->link
p->link=newnode

by using two pointers
newnode->link=q
p->link=newnode


7)
write the code for deleting item from linked list
q=p->link
p->link=q->link
delete q

8)
what is ADT?
Abstract data type
Specifies the logical properties without the implementation details

التعديل الأخير تم بواسطة لعبة طفل ; 31-03-2012 الساعة 12:17 AM
لعبة طفل غير متصل   رد مع اقتباس
قديم 31-03-2012, 12:37 AM   #3
لعبة طفل لعبة طفل غير متصل
طالب فضي
 
الصورة الرمزية لعبة طفل
افتراضي رد: اسئله من الدكتور تحتاج لحل


خطأ مطبعي
1)
what is the difference between :
- class and struct
class

all members of a class are private by default



struct

all members of a struct are public by default
لعبة طفل غير متصل   رد مع اقتباس
قديم 31-03-2012, 12:59 AM   #4
لعبة طفل لعبة طفل غير متصل
طالب فضي
 
الصورة الرمزية لعبة طفل
افتراضي رد: اسئله من الدكتور تحتاج لحل


After the following statement executes, what will be the content of intList:
intList.unique();
Choose one answer.

a. {3, 23, 43, 56, 11, 23, 25}
b. {3, 23, 43, 56, 11, 25} نحذف التكرار ماانتبهت لل 23
c. {3, 11, 23, 25, 43, 56}
d. {3, 11, 43, 25, 43, 56}
لعبة طفل غير متصل   رد مع اقتباس
إضافة رد

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

أدوات الموضوع
انواع عرض الموضوع

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

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

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


الساعة الآن 08:54 PM.


Powered by vBulletin® Version 3.8.1, Copyright ©2000 - 2018, Jelsoft Enterprises Ltd. TranZ By Almuhajir
جميع المواضيع والمشاركات تعبر عن وجهة نظر أصحابها
ولا تعبر باي شكل من الاشكال عن وجهة نظر منتديات AOUA
تصميم وتطوير : التكنولوجيا الماسية