منتدى استراحات زايد

منتدى استراحات زايد (http://vb.ma7room.com/index.php)
-   منتدى أخبار المواقع والمنتديات العربية والأجنبية (http://vb.ma7room.com/forumdisplay.php?f=183)
-   -   حل واجب m150b : 0544321455 : [email protected] : 00966544321455 : m150b tma (http://vb.ma7room.com/showthread.php?t=1207589)

محروم.كوم 03-30-2013 05:10 PM

حل واجب m150b : 0544321455 : [email protected] : 00966544321455 : m150b tma
 
M150 Data, computing and information

Question 1
1. Write JavaScript program according to the following:
a. Define a function called findMax which takes an array argument and returns the maximum number in the array.
b. Define two arrays of numbers:
  • The first array is initialized on declaration. It has 5 elements of your choice.
  • The second array has 6 elements and is initialized by values entered by the user (in a loop). Enter the values of your choice.
c. Call the function findMax to find the maximum number is the two arrays. Print the returned numbers in the output window. You need also to print the elements of both arrays.
d. Provide a screenshot of the output of your program. Make sure that the output includes the elements of both arrays and the maximum number in each one.

Question 2
In unit9, page 21 you were introduced to the methods associated with Date object. In the same unit, section 4.2 you learned how to use functions from the "dateLibrary.js" in JavaScript programs. The specifications for all the functions in this library are in Appendix 1 at the end of unit 9.
Write JavaScript statements to do the following:
a. Create the date 7 June 2000 and assign it to the variable date1.
b. Create the date 18 May 2020 and assign it to the variable date2.
c. Calculate the difference in days and years between date1 and date2 and print them in the output window.
d. Change the month of date1 to be September and print the new value in the output window.
e. Change the year of date2 to be 2013 and print the new value in the output window.
f. Display the day name of date1.
g. Display date1 in short form.
h. Insert a snapshot that shows the resulted output of parts d, e, f and g.
i. Provide a copy of the specifications of all the functions you’ve used in writing your program.
j. What information do we find in function specifications?

Question 3
You are required to model a new user-defined object type, Website.
The Website object type has the following properties:
name: a string variable representing the name of the website.
url: a string variable representing the address of the website.
description: a string variable holding a brief description of the website.

The Website object type has the following methods:
getName(): returns the name of the website.
getUrl(): returns the url of the website.
getDescription(): returns the description of the website.
display(): displays the name , url and description of the Website in an alert window. The method should use the methods getName(),getUrl() and getDescription().



a. Write the Website constructor function Website(aName,aUrl,aDescription).
b. Implement the methods getName(), getUrl(),
getDescription()and display() according to the above specifications.
c. Prompt the user for values of name, URL and description of a site he wants to create.
d. Create a Website instance and initialize its properties by the values entered by the user.
e. Use an appropriate method to print the Website instance information.
f. Run your program and test it to make sure it works properly. In your Solution document insert two screenshots:
  • one showing the program prompting for the website name, with you having entered the name but not yet pressed OK;
  • one showing the resulted alert window.
g. Change the description of the Website instance.
h. Suggest another way to change the description of the Website instance other than what you've done in g. Show the changes needed in the program to implement it and give an example on how you are going to use it.

Question 4
1. Discuss four features of a good website.
2. Many computer users think that the user interface through which they communicate with the computer is the system. What are the impacts of having a poor UI system in an organization?
3. The course book has given you the definition for the term usability. Illustrate it using your own words and understanding.
4. Login to the SIS using your user name and password. Write a short paragraph discussing the usability of the SIS, in your point of view. Do you think it is usable? Why? Why not? How can we improve it? Give suggestions.


الساعة الآن 03:25 PM

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.5.2 TranZ By Almuhajir


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227