حلول واجبات الجامعة العربية المفتوحة ( TECHNOLOGY SHARING CENTER )
اهلا بك في منتدانا

حلول واجبات الجامعة العربية المفتوحة ( TECHNOLOGY SHARING CENTER )

حل واجب الجامعة العربية المفتوحةحل واجبات الجامعة العربية المفتوحة واتس اب +966596368034ايميل : aou_sheets@yahoo.comواتس اب +966596368034
 
الرئيسيةالرئيسية  اليوميةاليومية  س .و .جس .و .ج  بحـثبحـث  التسجيلالتسجيل  دخولدخول  

شاطر | 
 

 حل واجب m275 spring 2017

استعرض الموضوع السابق استعرض الموضوع التالي اذهب الى الأسفل 
كاتب الموضوعرسالة
aou.tma2016



عدد المساهمات : 62
نقاط : 148
تاريخ التسجيل : 15/11/2016

بطاقة الشخصية
حلول واجبات الجامعة العربية المفتوحة:

مُساهمةموضوع: حل واجب m275 spring 2017   الأربعاء مارس 29, 2017 4:30 am

Question 1 [20 Marks]
Using the AOU e-Library or other online sources, search for “MariaDB” and briefly
explain its relation to “MySQL”. Make sure to present a good paragraph of about 100
words.
Question 2 [50 Marks]
This question is based on the “guessing machine” (Chapter 11) that was discussed
during the tutorials.
You are asked to implement the PHP and HTML code that will complete the program
below. The program is mainly a guessing game to try and guess what the scrambled
word is.
Here is a sample run with explanations that are followed by some hints:
For the first visit, the user
will be presented with a
welcome message and a
word to be guessed.
The shuffled word to be
guessed is “supermarket”
If the user guessed the
word correctly, he will
receive a proper message
and a new word to guess.
The new word in this
example is “programming”
If the user did not guess
the word correctly, he will
receive the same word but
with a different shuffling.
The word in this example
is still “programming”
M275 – TMA Page 3 of 4 2016-2017 / Spring
Hints:
 In order to be able to provide for each run a new word to be shuffled you can
place the words in an array and generate the index of the word to be guessed in
a hidden form input element.
Here is a sample array:
$strArray = array("supermarket", "programming", "development", "apache",
"university");
 For the first visit to the page, the index can be initialized to 0, which is the first
word. That index can then be retrieved from the posted data since it can be
placed in a hidden form input element.
Here is an example of how it can be implemented:
<input type="hidden" name="index" value="<?php echo $index; ?>">
 In order to shuffle the characters of a string, you can use the function
“str_shuffle”. Check online the documentation of how str_shuffle can be used.
Question 3 [30 Marks]
Writing SQL queries:
Read the section “Using Join” of Chapter 16 in the book (pages 312 -> 314 in the fifth
edition) then answer the questions below:
Consider the following tables:
students
student_id firstname lastname
123 Some One
125 Another One
167 Good Student
courses
course_code course_name
M275 Web Development using PHP and MySQL
M180 Data Structures and Algorithms
Students can register in many courses and each course can have several students
registered in it.
a- Write an SQL query that would create the table registration to keep track of which
student is registered in which course using the following structure:
M275 – TMA Page 4 of 4 2016-2017 / Spring
registrations
student_id course_code
b- Write SQL insert queries into table registrations to reflect the following
registrations:
 “Some One” (id: 123) is registered in “M275”
 “Some One” (id: 123) is registered in “M180”
 “Good Student” (id: 167) is registered in “M180”
 “Another One” (id: 125) is registered in “M275”
c- Write an SQL select query using left join that would retrieve all the names of
students that are registered in a course that includes the word “Development” in
the course_name field.
Note: you need to list the names by performing concatenation between the fields
firstname and lastname.
End of the Questions
الرجوع الى أعلى الصفحة اذهب الى الأسفل
 
حل واجب m275 spring 2017
استعرض الموضوع السابق استعرض الموضوع التالي الرجوع الى أعلى الصفحة 
صفحة 1 من اصل 1
 مواضيع مماثلة
-
» خطط التحسن ونظم المتابعة لجميع المجالات2016/2017
» تشكيل لجنة لإعداد ملف لاستضافة المغرب لأمم إفريقيا عام 2015 أو 2017

صلاحيات هذا المنتدى:لاتستطيع الرد على المواضيع في هذا المنتدى
حلول واجبات الجامعة العربية المفتوحة ( TECHNOLOGY SHARING CENTER ) :: منتدى طلاب تقنية المعلومات والحاسوب-
انتقل الى: