CSCI 1001 - Introduction to Computer Science for Non-Majors  

Homework Assignments

Spring 2010
 

[ CSCI 1001 Home | Syllabus | HomeworksResources ]

Click here to visit web pages created by students in this class.


 
Date Assigned
(most recent assignment
appears first)

Assignment
(Typically due before next class after the "date assigned" listed left, unless otherwise indicated)
4/22/10
Finish up your team final project and prepare for your presentation. The final presentation will be on Thursday, April 29, 8:00am-10:30amSee C1001FinalProjectRequirements.doc  and the Rubric at the end as a check list to be sure your project and presentation meet the listed requirements.
Each team should have the entire project on a flash drive to use with the master computer in A-209 to give your presentation. Store your Alice file and any other files (such as textual & visual storyboard, sound files, etc.) on your flash drive.  Each team will have 15 minutes to show your storyboards, Alice project demo and coding, and answer questions.
4/20/10
The reflection essay is due by email before Thursday's class.
Finish up your team project.  Double check
C1001FinalProjectRequirements.doc to make sure your project satisfy all the requirements.
4/15/10
Complete the Reflection Essay (100 pts) and email it to me before Thursday, April 22's class.
The following features of the team project will be due at the end of the class (60 pts): import a sound, use if/else control structure properly, and implement a new feature. Refer to 4/13/10 entry for examples of new features.
4/13/10
Continue to work on your team final project. The following features will be due at the end of next class (60 pts): import a sound, use if/else control structure properly, and implement a new feature.  Here are some examples of new features: use while loop, create new methods with parameters, or create new functions.
4/8/10
The following features of the team project will be due at the end of the class (60 pts): a new class-level method, a new world-level method, and two events with proper prompts to users (besides the default event).
4/6/10
Test 2 answer keys: test2a_answer.doc or test2b_answer.doc (with the "+" sign on the test)

Continue to work on your team final project. The following features will be due at the end of next class (60 pts): a new class-level method, a new world-level method, and the two events. Please remember to give user certain prompts for them to initiate the events you created.
4/1/10
Test 2
3/30/10
Answers to the Alice review questions can be found in AliceReviewQuestionsAnswers.doc.  Test 2 will be on Thursday, April 1.
3/25/10
(Test 2 will be on April 1)
Continue to work on the storyboard of your team project. The textual story board and visual story board (60 pts, in hard copy) are due at the beginning of next class on Tuesday.
Test 2 will be given on Thursday, April 1. Complete the Test 2 review questions AliceReviewQuestions.doc before the next class.
3/23/10
Topic: Abstraction, modularity, encapsulation; Starting your team project.

The requirements for the team project are given in C1001FinalProjectRequirements.doc. Read over this document carefully so that you can ask questions now about the requirements. 
Use this class and the next class to work on the design of your project, i.e., the textual story board and visual story board of your project (see Alice textbook Chapter 2).
3/18/10
Alice greeting card project demo (50 pts).  (Bring a USB flash drive with your Alice world for demo. Each student has 5 minutes.)
3/16/10
Topic: Events in Alice and understanding your code

Reading: Alice textbook  Chap 5
Assignment to be completed by the end of the class (30 pts): 
Read through the Alice tutorial #3 about events. Continue to work on your Alice greeting card.
Add at least two new events to your card, besides the default one  "When the world starts, do world.my first method". Please make sure to give user certain prompts/instructions so that they know how to initiate the events you created. (Alice textbook Chap 5)
Bonus feature (10 pts):  Use while loop in your card appropriately. (Alice textbook Section 7-2)

Written assignment (hard copy due at the beginning of next class, 30 pts):
1. (4 pts) Which of the following are objects? world, camera, move, bunny.
2. (6 pts) Which part of the Alice code below is a method? What object owns (is responsible for performing) this method?  “camera |point at | ball”.
3. (8 pts)
What  is the function call in the following Alice code tile: [ spiderrobot | distance to left of | ball  ] ?  What is the argument (data) you give the function in this code that allows the function to complete its job? What does this function do when this code is executed?
4.
(12 pts) Explain exactly how each code tile described below works  in your card.  In your explanation identify the properties, functions, methods, and their arguments in the tile you are describing.  Write down your code first, then explain them.
- Tile that uses method "say".
- Tile that uses the vehicle property.
- Tile that uses the "distance to" function.

Example Answer:  the tile "toyballl | move | forward| 1 meter |" works as follows:  The toyball (an object) will move (method of the toyball object) forward (an argument that the method "move" uses to complete its action) a distance of 1 meter (the other argument that the "move" method needs to complete its task.
Example Answer:  the tile "toyball | set color to | red" works as follows:  The toyball uses its "set" method to make its "color" property contain the value "red".  "Red" is the argument that the "set" method uses to complete its job.


Each student will be asked to demostrate your Alice greeting card project to the entire class during the next class. Please save your Alice project on a flash drive and use if for demo. Please catch up with the work you missed and make sure your Alice greeting card project has all the required features.
3/9/10 & 3/11/10
Spring break. No class.
3/4/10
Topic: If/Else control structure and camera control in Alice

Reading: Alice textbook 3-2, 6-2, and Tips & Techniques 3.
Homework (due by the end of the class, 60 pts)Continue to work on your Alice greeting card and add the following features:
(1) (5 pts) Add some comments to your code.
(2) (25 pts)
Use "if/else" control structure appropriately in your code. (Alice textbook Section 3-2 and 6-2)
(3) (25 pts) Add some camera control to your code. Under "add objects", click "more controls", and click "drop dummy at camera". You can then return the camera to its original position by right-clicking the camera object and choosing "move" to "dummy". You can have more than one dummy so the camera can move among multiple positions.
(Topics for next class will include events in Alice).
3/2/10
Topic: Class-level methods and world-level methods in Alice

Reading: Alice textbook Chapter 4
Homework (due by the end of the class, 60 pts)
  Read chapter 4 to understand the difference between class-level methods and world-level methods. Continue to work on your Alice greeting card. Your card should have the following features:
(1) (30 pts) Add a person to your card if you don't have one.  Once a person is in your card, create a new class-level method called "walk" (or other similar name) for this person and make the person walk (do not using any pre-defined walk methods if there is any).  The person should move some distance horizontally and bend its legs or feet in a way that resembles walking, but need not be perfect (Alice textbook, Section 4-3). 
(2) (10 pts)
Use "loop" control structure and the "walk" method your created to make your character walk mutliple steps (Alice textbook, Section 3-2).
(3) (20 pts) Create a new world-level method for the characters in your greeting card and call it from World.my first method (Alice textbook, Section 4-1).
(Topics for next class will include if/else control structure and cameral control).
2/25/10
Topic: Objects, properties, and functions in Alice

Reading:
Chapter 2 & 3
Homework (due by the end of the class, 60 pts)  Continue to work on your Alice greeting card. Your card should have the following features:

(1) (10 pts) Include the code to c
hange the value of one of the properties of the objects to a new value and then back to the original value (Alice textbook, Section 2-2).
(2)
(20 pts) Make one object a vehicle for another object (Alice textbook, Chapter 2, Tips & Techniques), and make the vehicle object to move in a way that shows that you have correctly used the vehicle property.  
(3) (10 pts) Make one object move to another object by using the built-in  "distance to" function in your code. You will notice that the object collide. 
(4) (20 pts) Refer to Alice txtbook pp. 66-68 on collisions and change your code so that your objects do not collide.

(Topics for next class will include methods in Alice).

2/23/10
Topic: Control Structures in Alice

Reading: Appendix A and B; Chapter 1, 2-2
Homework  (due by the end of the class, 60 pts):
1.  Read Appendix A and B of the Alice textbook
2. Continue to work on your Alice greeting card. By the end of the class, you  card should have the features required on 2/18 class, plus the following new features, i.e., using "do in order" and "do together" in your code (Alice textbook, Section 2-2).
(Topics for next class will include object properties and functions in Alice)
2/18/10
From now on:
1. Bring your Alice Textbook to class,
2. Save your Alice Worlds--so that your most current work is available during class. You can use H drive, flash drive,  and/or personal server to keep the most current files of your work.
3. Work ahead as you like.

Test 1 answer keys: test1a_answer.doc or test1b_answer.doc (with the "+" sign on the test)

Topic: Programming with Alice to learn some of the fundamental concepts that underpin how computer scientists think in their problem solving activities: Object Oriented Thinking, Abstraction, Encapsulation, and Modularity.
Alice is a pedagogical tool to teach the concepts in a fun way. This is NOT professional game building software, because it is slow to execute and does not support enough features.  However, the software does deal with the issues of gaming programming and the thinking that is required. Maya is an example of the sort of software professionals use, but to use Maya that creates programmable graphical 3-D characters and worlds, you would NOT be able to create anything  interesting in one semester. Alice allows you to learn and apply the concepts gaming programmers use, skip the details that Maya requires, and get something interesting right away.

Homework:
1. Take the Alice Tutorials #1 and #2.
Alice.exe is on the computers in A-209 in the Applications Folder on the PC desktop AND also on the CD in the back of your Alice textbook.
2. Read
Appendix A and B in the Alice textbook.
3. You will also start your first Alice project: making a greeting card. Decide on a theme (birthday, get well, Easter, St. Patrick's, Graduation, Christmas, Friendship, belated Valentine.  In each of the next few classes, you will add more features to your greeting card.
For your card, choose a world template and add  two characters. Then use an existing (primitive) method for the character to make the character move in some way (you have 3-D).  Then  make a body part of one character move.Then make one character say something. (Chapters 1,2)
3. Save this greeting card to your  flash drive and H: drive in lab so that it is available to you next time, when you will add more features.
2/16/10
Test 1
Note: Please have your Alice textbook ready for Thursday's class.
2/11/10
Answers to the review quiz can be found in  C1001_ReviewQuiz1_answers.doc.
Test 1 will be on Tuesday, Feb. 16.
2/9/10
(test 1 will be on 2/16/09)
Topic:  Introduction to the concept of variables, attributes (properties), functions, methods, and objects
Handout:
StoringData.doc

Homework:
(1) Continue to work on your JavaScript page and send me the URL by the end of today's class.
(2) Answer the questions in  C1001_ReviewQuiz1.doc  (This review quiz will help you study and prepare for the Feb. 16 test. )
2/4/10
Topic Introduction to JavaScript
Resourceshttp://www.w3schools.com


Homework :
Read the basics of JavaScript tutorial at http://www.w3schools.com. Create a new web page with the following features using JavaScript. Add a link on your home page to your JavaScript page, and also add a link from your JavaScript page back to your home page. Upload your udpated files to the personal server.
(1) Use the JavaScript instruction, document.write( ), to write some text to your page. Indicate the font style (such as font type, color, size, etc) for your text in your JavaScript code. Also use document.write to write  today's date and current time to your page. Add some comments to your JavaScript code.
(2) Refer to the example for JavaScript variables. Define a variable in your JavaScript code, assign some value to it, and display the value to your page.
(3)
Use the JavaScript function "prompt" to ask the visitor for data, store the data into a named memory location ( i.e., a variable) by using "=", and then display the content of the variable (the visitor's data) in an "alert" box.  Here is a similar example (the script in the first "blue" box) at http://www.htmlite.com/JS007.php.  Please do not use the same question/text used in the example for your web page. Be sure to enclose your script between the HTML and BODY tags.  Test the page in a browser to see that it works.
(4) Bonus quesiont (5 pts). Use either JavaScript if/else statement or a for loop or a while loop on your page. The statement(s) you used should make sense.  (Simply copying the examples from the JavaScript tutorial and making very little change will not earn you extra credits).

DELIVERABLES (50 pts, due at the end of the next class):
Email me the URL of your JavaScript page with the required features. Always test your URL to make sure it works properly before sending it to me. 
2/2/10
Student web page demonstration (50 pts)
  • Give your 5-minute presentation to the class about the web site you created. Share your web page design experience with the class, for example, how much experience you had prior to this class in making web pages, what you learned about making web pages from this class.  (As back up, also bring your USB flash drive with the web page files on it to the presentation, in case the personal server is down).
  • Audience participation: As  you listen to other students show their web sites, write down comments about the site shown: one BRIEF comment about  what you especially like about the site and give BRIEF one comment about  what you would change about the site. Hand in at the end of class your comments. Forms will be provided at the class.
1/28/10
Topics: HTML and Web pages (continued)

Homework:
a. Continue to improve your web page. Mare sure your web page has satisfied all the requirements from previous homeworks.
b. Rename
your web page using a default file name (index.html) and ftp it to your account at ECU personal server.  (Put this file on the top level of your account, i.e, don't put it under any subdirectory you created).
c. Add the following new features to your web page.  Create a list on your page to list your hobbies. Add an email link on your page for people to send you comments.  Add some of your favorite links to your page.  Create a separate page with a table on it. You can design the content and the style of your table in any way you want. Add a link on your home page to link to your new page. Also add a link on your new page to go back to your home page.
d. Deliverables (50 pts, due by Tuesday, Feb. 2): Email me the URL of your default web page. It should be in the format of http://personal.ecu.edu/yourPirateid. Test the link to make sure it works before sending it to me.
e. Bonus question (10 pts): Use multiple frames on your web page to make a nice layout.
f. During the next class (Feb. 2), each student will be asked to give a demo of your web page to the entire class (50 pts).
1/26/10
Topics: HTML and Web pages (continued)

The objective of this exercise is to be sure you can ftp a file to a web server that has granted you ftp access (such as ECU personal server) and to be sure you know how to create a URL. 

a. Read over the material in WebPage_Make_Store.html.
b. Add a heading (such as "XYZ's Home Page") to your page and make it center alighed. Add a hyperlink to your web page to link to the CSCI 1001 website. 
Also add a title to your web page, using the title such as John Smith's Home Page (using your name). Please note that the title is not the content inside a web page, rather it is the one that is displayed on the upper left corner of the browser window.  Refer to the HTML tutorial  about how to add a hyperlink and how to add a title to the page.
c. Add some comments to your HTML code to explain what your code is about. Refer to the HTML tutorial and examples about how to add comments. Improve the web page you created for the previous homework.  Make sure it displays properly in a browser.
d.  FTP this page, including all other files, such as the image file, to one SUBDIRECTORY that you make in  your main directory (folder) on ECU's web server, personal.ecu.edu. See the EXAMPLE in  item #2 in
WebPage_Make_Store.html for instructions as given in class, illustrated with Internet Explorer.
e. Create the URL and use it with your browser to be sure the public can view this page.  The URL will start with http://personal.ecu.edu/.  See the end of EXAMPLE in item #2 in 
WebPage_Make_Store.html .
f: Bonus question (5 pts):  Add a hyperlink to your web page. When the link is clicked, it should open a separate window to display the linked web page.
g. DELIVERABLE (50 pts, due by Thursday, Jan. 28): E-mail me the URL of your web page. Your web page should have the features required from last class and this class. Before sending me the URL, please test it in the browser to make sure it works.
1/21/10
Topics: Introduction to making web pages using HTML

Make a web page by writing your own own HTML code from scratch (do not use Dreamweaver or other HTML editor):
a. Open Notepad and create a blank document. Save this file as yourlastname.txt (save the file on the H drive under your account). 
b. Use your browser to go to the website, http://www.w3schools.com.  Once there in the left margin under "Tutorials", click "Learn HTML". Then click "Try it yourself" under "Examples". You will get the side-by-side screens in a window: editing (program creation) screen on the left where you enter your text, images, and  HTML tags, and  the web browser window  showing the web page the browser displays using your program in the left screen.
c. Under  any of the examples (or tutorials in the left menu) to create a web page for yourself that provides your name and major and also features
a background color that is not white,
text that is not black, 
text blocked into paragraphs, and
an image that has been inserted.
Add any other features you like--explore the tutorials!  
Try out your code in the edit screen.

Once you see what to do, type or copy this material into your NOTEPAD document,  yourlastname.txt.

Image: use one you have OR right click on one of the images you see in the right screen at http://www.w3schools.com/html/tryit.asp?filename=tryhtml_images, and save to the folder that has your NOTEPAD file.

d.  Once you have finished inserting the proper text and tags into the NOTEPAD file, save the file using the extension .txt.
e. Put the image file you referenced in the HTML and the NOTEPAD file into the same folder on your computer.
f.  Change the .txt extension to .html.
g. Open your html file in your browser.  Be sure it displays properly as  you intended.  Change as needed.
1/19/10
Topics: Computer architecture and binary numbers (continued)

Homework (40 pts, due by Thursday, Jan. 21): Hand in your homework in hard copy at the beginning of the next class.
In answering each of the following, write the problem and then your answer.  Use complete sentences to provide your answers!
1. 
(8 pts) What is difference between "bit" and "byte"? How are the words "binary digit" and "bit" related? Give an example of a bit pattern containing exactly 4 bits. Give an example of a bit pattern that is considered a byte.
2.
(6 pts) What are the decimal digits? What are the binary digits?
3.(12 pts) What decimal numeral does each of the following binary numerals represent?  10010100, 01011111, 01111111, 01100011.    For credit, show how you arrived at your answer by referring to the place values of the binary digits.   (Example:   Binary 00001001 is decimal numeral 9 because 1x8+0x4+0x2+1x1=8+1=9.)
4.
(6 pts) One system (agreed upon arrangement of bits into a bit pattern) for representing text (keyboard characters, like letters of the alphabet) is the 8-bit ASCII system.  You can see the conversion at http://www.roubaixinteractive.com/PlayGround/Binary_Conversion/Binary_To_Text.asp. Using this website, convert the following keyboard characters to ASCII: A, a, B, b, Z, z.
5.
(8 pts) Look at the list of bit patterns you got for the 6 keyboard characters above: What appears to be the method of creating the bits for these patterns?  For example, what do all these letters seem to have in common?  In which bits are they different? How are they different? (For example, you can look for patterns by comparing the ASCII code of  'a' with 'A', 'a' with 'b', 'A' with 'B', 'a' with 'z', 'A' with 'Z', etc.)
Bonus question (5 pts): How can we represent negative integers in binary numbers? (Try to figure out the solution by yourself first, then you can verify your answer or look for clues from the internet/books. Do not simply copy the answer from the internet/books. Use your own words to describe the solution after you understand it).
1/14/10
Topics: Introduction to computer architecture and  binary numbers.
Handouts:   VonNeumann.doc and DataRepresentation.doc
1/12/10
1. Buy your Alice textbook.
2. Read syllabus.
3. Check if you have access to the H drive on the lab computer. If not, report to the instructor.
4. Request personal web space on ECU Personal Server.
To submit a request form: Go to http://help.ecu.edu >> Click Submit Online Request >> Click the "Website Space Request Form"  in the left menu.
5. (20 points) Please send me an email via your ECU mail account with subject line CSCI 1001-[your full name].   In this email give
    a. your major (or intended major),
    b. a brief summary of your experience with computers (browsing, using emaill, using software like MS Word, playing games, writing programs--name languages, creating graphics, processing photos, etc.),
    c. why you are taking this class, and
    d. a statement that you have read the syllabus for this class.



Send questions and suggestions to dingq@ecu.edu

[ CSCI 1001 Home | Syllabus | HomeworksResources ]