aou حل واجبات الجامعه العربيه المفتوحه2017/2018
الرئيسيةالرئيسية  اليوميةاليومية  س .و .جس .و .ج  بحـثبحـث  الأعضاءالأعضاء  المجموعاتالمجموعات  التسجيلالتسجيل  دخول  

شاطر | 

 حل واجب M275 spring2016

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

المساهمات : 153
تاريخ التسجيل : 22/08/2016

مُساهمةموضوع: حل واجب M275 spring2016   الجمعة أغسطس 26, 2016 7:41 pm

Question 1 [20 Marks]

Using the AOU e-Library, go to the “EBSCO HOST” sub-library and search for the term PHP. Among the first few results you should find a link to the article “One Solution for Protecting PHP Source Code”.

Open/Download the article and answer the following questions the way they were discussed in the article. For each question provide your answer and also quote the phrase that supports your answer as additional proof.

a- Is PHP used on many web servers worldwide? [5 Marks]
b- Does PHP provide good XML support? [5 Marks]
c- What percentage of websites used PHP in 2013? [5 Marks]
d- What was the one really significant problem that the article mentioned? [5 Marks]

Note: All the answers are available in the Introduction section of the article.

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 code that will complete the program below. The program is mainly a mathematics practice tool to help people practice their multiplication skills.

Here is a sample run with explanations:

When the user first comes to the site a new expression is provided.

The user enters the guess and submits the form using the “Check” button.
The program checks the answer and if wrong provides a proper message and allows the user to keep guessing the same expression.

If the user guesses the result, then a new expression is provided.

Here is a the HTML form to be used:

<?php //Fill this section with all the required code! [50 Marks]
?> <html> <body> <h2><?php echo $message; ?></h2> <form method="POST" action="<?php echo $_SERVER['PHP_SELF']; ?>"> <input type="hidden" name="answer" value="<?php echo $answer;?>"> <input type="hidden" name="expression" value="<?php echo $expression;?>"> What is the value of the following multiplication expression: <br><br> <?php echo $expression; ?> <input type="text" name="guess"><br> <input type="submit" value="Check"> </form> </body> </html>
Note: the variable $message should contain the message to present to the user, the variable $answer should contain the correct answer, and the variable $expression should contain the mathematical expression.

You are also required to use the rand() PHP function which simply generates a random number. If you need a random number between 1 and 9 inclusive, the you use the function rand(1, 9)

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 following:

a- Write SQL queries to create 3 tables and other SQL queries to add 2 records to each table as the following. You’re the field types that you find suitable:
[24 Marks]
Table: info
studentid studentname
12345 student good
54321 student bad

Table: grades
studentid studentgpa
12345 3.57
54321 1.72

Table: status
studentid studentstatus
12345 pass
54321 fail

b- Write an SQL query using JOIN to produce the following table:
[6 Marks]

studentid studentname studentstatus
12345 student good pass
54321 student bad fail

الرجوع الى أعلى الصفحة اذهب الى الأسفل
معاينة صفحة البيانات الشخصي للعضو http://wagbat-123.a7larab.net
حل واجب M275 spring2016
الرجوع الى أعلى الصفحة 
صفحة 1 من اصل 1

صلاحيات هذا المنتدى:لاتستطيع الرد على المواضيع في هذا المنتدى
wagbat.123 :: حل واجبات الجامعه العربيه المفتوحه whats.app: 00966542495275 :: حلول واجبات 2017/2018 AOU(يشاهدة الآن 3537 زائر)-
انتقل الى: