Discussion :  SOU CS Classes The fastest message board... ever.
Forum for discussion, questions, and replies relating to Web Development I 
Goto Thread: PreviousNext
Goto: Forum ListMessage ListNew TopicSearchLog In
Week 8 - Friday Discussion
Posted by: harveyd (IP Logged)
Date: November 12, 2007 07:36PM

1. Create a pop up window that displays 'mypage.htm'.
2. What needs to change in question 1 to make the window resizable and size 100x100 pixels.
3. Create a popup window containing the HTML for a simple web-page. This question can have more than one answer.
4. Assume x=3, y=4, z=-1, s="abc" t="ABC" u="abcd" v="ABCD". True or False? (answer at most two of these).
i. x<y
ii. y<x
iii. x<=y
iv. y<=x
v. x<=y-1
vi. x<y-1
vii. x*z<0
viii. x*z<=0
ix. x<y&&z==-1
x. x>y||z!=-1||x+1<=y
xi. !(x+1>=y)
xii. s<t
xiii. s<=t
xiv. s<u
xv. v<s
5. What alerts? (answer at most two of these)
i. var x=1; alert(x++);
ii. var x=1; alert(++x);
iii. var x=4; x*= 2; alert(x);
iv. var x=4, y=3; alert(++x + ++y);
v. var x=4, y=3; alert(++x + y++); alert(x+y);
vi. var x=4, y=3; alert(++x + ++x);
vii. alert(Math.floor(4.2));
viii. alert(Math.sqrt(Math.floor(4.2));
ix. alert(Math.ceil(5.3);
6. Write an 'if' statement that alerts 'hello' if x<y and alerts 'goodby' otherwise.
7. Write 'if' statements that based on a month (from one to twelve) and year will alerts the number of days in the month.
8. Modify the previous question to handle leap years. (The % operator means remainder - month%4==0 for leap years).
9. Write an 'if' statement that alerts three times ('time1', 'time2', and 'time3') when x<=y.
10. Write an 'if' statement that prints 'ok' if x contains a valid number.
11. Declare a variable with a random number between 0 and 10.
12. Declare a variable with a random number between 4 and 9.
13. Convert the value in a GUI text field to an integer. The text field has its id attribute set to "textField".
14. Declare a variable with a random number between -3 and 5.
15. What is a good discussion topic for future classes?
16. What would be a good lab project?
17. Create a test question that you think would be good to add to either the on-line lecture, for a synthesis question, or for a quiz. Answer your question.
18. What do you wish you knew at the start of the lab project?
19. What suggestions do you have for the on-line lectures, lab projects, power point slides, etc.?
20. What mistakes did you find in the on-line material?

Re: Week 8 - Friday Discussion
Posted by: (IP Logged)
Date: November 13, 2007 02:59AM

i. x<y
ii. y<x

i is true because x=3<y=4.
ii is false because y=4 is not < x=3.

Re: Week 8 - Friday Discussion
Posted by: (IP Logged)
Date: November 14, 2007 05:28AM

4. Assume x=3, y=4, z=-1, s="abc" t="ABC" u="abcd" v="ABCD". True or False? (answer at most two of these).
iii. x<=y
iv. y<=x

iii TRUE
iv FALSE

5. What alerts? (answer at most two of these)
i. var x=1; alert(x++);
ii. var x=1; alert(++x);

i 2
ii 2

Note from Dan: In the first case will alert a 1, but then x will increase to 2.



Edited 1 time(s). Last edit at 11/14/2007 05:03PM by harveyd.

Re: Week 8 - Friday Discussion
Posted by: (IP Logged)
Date: November 15, 2007 10:56PM

4. Assume x=3, y=4, z=-1, s="abc" t="ABC" u="abcd" v="ABCD". True or False? (answer at most two of these).

v. x<=y-1
vi. x<y-1

v. true
vi. false

Re: Week 8 - Friday Discussion
Posted by: (IP Logged)
Date: November 19, 2007 05:37PM

vii. x*z<0

This statement is true because 3*-1<0.

viii. x*z<=0

This statement is true because 3*-1<=0.

Re: Week 8 - Friday Discussion
Posted by: (IP Logged)
Date: November 20, 2007 04:38AM

9. What suggestions do you have for the on-line lectures, lab projects, power point slides, etc.?
One thing that I wish that I could find is a tutorial that showed me step by step how to use elements of Javascript. Someone could use Javascript to make such a program. I just wish that my experiance using JS was a little more practical because I understand when I listen to the in inclass lecture and do the Camastia tutorials but when I try to do it on my own it doesn't turn out right.

Re: Week 8 - Friday Discussion
Posted by: (IP Logged)
Date: November 21, 2007 12:38AM

1. Create a pop up window that displays 'mypage.htm'.
window.open("mypage.htm"); //No frills

2. What needs to change in question 1 to make the window resizable and size 100x100 pixels.
window.open("mypage.htm",,"height=100, width=100,resizeable=yes,");

6. Write an 'if' statement that alerts 'hello' if x<y and alerts 'goodby' otherwise.
if (x<y)
alert('hello);
else
alert('goodby');

Re: Week 8 - Friday Discussion
Posted by: (IP Logged)
Date: December 03, 2007 05:43AM

4. Assume x=3, y=4, z=-1, s="abc" t="ABC" u="abcd" v="ABCD".
iv. y<=x false
v. x<=y-1 true
vi. x<y-1 false
vii. x*z<0 true
viii. x*z<=0 true



Sorry, only registered users may post in this forum.
This forum powered by Phorum.