Vous êtes sur la page 1sur 9

111

Project 5
CIS 111 WEB PROGRAMMING

Michael Hennessy, Computer & Information Science, UO

CIS 111 Web Programming

Web Programming
Project 5
Due Date: 1700 F
12/5.

CIS 111

Project Requirements
to repeatWord.js:

Due Date: 1700 F 12/5.

PROJECT REQUIREMENTS

This project will be discussed in detail in class; that is the best

place to ask questions about the project. If you skip class, then

please be consistent: do not attend oce hours, which are in

short supply in a large class.

Solve the following problems in order. Always put "use strict"; at

the top of your .js files.

1. [20 pts] 111/mu/repeatWord.html and repeatWord.js

A) Command-Line JavaScript. Write and test a function

2. [20 pts] 111/mu/starWedge.html and starWedge.js.

repeatWord that accepts a string s and returns a string that

has as many copies of s as s has characters:

A) Command-Line JavaScript. Write and test a function

starWedge that accepts a number n, which is the number of


console.log(repeatWord(cat));

//catcatcat

stars on the first line, and returns a string with n stars on the

first line, n-1 stars on the second line, etc., down to 1 star on
B) Client-Side JavaScript. Create this web page and connect it

the last line:


console.log(starWedge(7))

3. [25 pts] 111/mu/dougFir.html and dougFir.js.

Note: You can add the newline character to

A) Command-Line JavaScript. Write and test a

a string using '\n'.

function dougFir that accepts a number n, and

returns a string that is a tree made of stars:

B) Client-Side JavaScript. Create this web

page and connect it to starWedge.js. If you

insert the string into a <pre></pre> element

on the web page, a fixed-width font will be

B) Client-Side JavaScript. Create this web page

used by your browser:

and connect it to dougFir.js. If you insert the string into a

<pre></pre> element on the web page, a fixed-width font will

be used by your browser:

4. [35 pts] 111/mu/wordFrame.html and wordFrame.js.

A) Command-Line JavaScript. Write a

When the user enters the sentence, separate the words in the

function named wordFrame that

input with blanks; punctuation is not required, but may be

accepts a string representing a

included. Use the String split method to create an array of

sentence, and returns a string that

words from the user input in the text box.

shows the words one per line in a


rectangular frame. For example,

5. [10 XC pts] 111/mu/explodeN.html and explodeN.js.

"Hello World in a Frame" gets

A) Command-Line JavaScript. Write a function xplode that

displayed as:

accepts a number n and returns an array of its digits.

B) Client-Side
JavaScript.
Create this web
page and
connect it to
wordFrame.js. If
you insert the
string into a
<pre></pre>
element on the

console.log(xplode(2001));

// [2, 0, 0, 1]

B) Client-Side JavaScript.
Create this web page and
connect it to wordFrame.js.
If you insert the string into a
<pre></pre> element on the
web page, a fixed-width
font will be used by your
browser:

web page, a
fixed-width font
will be used by
your browser:

CIS 111 Projects

How to Turn In your Project


How to Turn In your
Project
All you Have to Do is Make Sure
your web pages are uploaded to
the server and tested on the
server by the Due-Date.
When your web pages are on the
server, they can be graded.
You do not have to submit this
project in Blackboard, nor do you
have to notify your instructor in any
way (not even by Owl post).

date, this will change the time-stamp of the files on the server,
and your project will be late (zero points).

Q UESTIONS A BOUT THIS P ROJECT ?


Do not send email to your instructors to ask questions about
this project. Post your questions on Piazza, so all students in
class can see the answer.

111 H ELP
See 111 Help Hours in Blackboard for a schedule for times
assistance is available in 013 Kla. Only 111 GTFs will know the
specifics of this project but, if you show the other consultants
the project, they can help, too.

Just make sure you complete the


project by the Due-Date, and do not
upload or edit the files after the
due-date. If you change the web
page files in any way after the due-

CIS 111 Projects

Project Grading Checkpoints


HOW YOUR PROJECTS WILL BE GRADED

These checkpoints will help you get full credit on your projects.
The files you upload to the server by the due-date are what

Do not use Aptana's Sync button, as this can change the


time-stamp on all your files on the server.
Your 111 folder on the server must be .htaccess password-

will be graded, so be sure to test your web pages on the

protected. If it is not, your project score will be zero (0). See

server to make sure they are correct.

your instructor or GTF for assistance if necessary.

Your job: make sure the files are on the server on time, and

Know the 111 Late Policy.

that you have tested them to make sure they are correct.
There are no second chances. We do not have the time or the
resources to grade your work twice. Therefore make sure that
what you upload to the server is correct. Test your web pages
on the server after uploading them.
Time-Stamps are Crucial. When you upload a file to the
server, it is stamped with the exact time of the upload. This
time-stamp must be no later than the project due-date. Your
project is on-time only if the time-stamps show that it was
uploaded to the server on time.
Do not re-upload any of your project files after the duedate. If you do, this will change the time-stamp and your
project will be late (0 pts).

CIS 111 Projects

Meeting the Deadline


How to Handle the 17:00
Friday Deadline
Start working on your project
early. Do not delay.
Friday Oce and Help hours
are jammed, and may end
before you get assistance. Plan
on completing all your projects

[Instructors] are a
Superstitious Sect,
Great Keepers of Set
Times and Places.
-- from Poor Richard's Almanac

before the Friday deadline.


Turn in what you have by the deadline-- partial credit is better
than none.
Piazza is good for answering questions. For debugging code
you need F2F help, which is the gold standard.
For Gold Standard Help:
-- See Contacts in Blackboard.
-- See 111 Help Hours in Blackboard.
7

The 111 WebDev Workflow


The Web Development Cycle we'll be using in CIS 111 works like this:
1.

Use a text editor to create a web page (.html file) on your computer.

2.

Preview the web page on your computer using Chrome. When it is perfect, and not
before, go to the next step.

3.

Upload the Web Page. Upload your .html file to the server using CyberDuck or
Sublime.

4.

Test your Web Page on the Server. Use Firefox to open the web page that is on the
server. Do not use CyberDuck, use Chrome.

Related Glossary Terms


Drag related terms here

Index

Find Term

Vous aimerez peut-être aussi