Introduction to Computer Science

Instructor - Robert Hochberg 
Office-         STC C-121 
Phone-         328-9685 
Email-         hochberg@cs.ecu.edu
Text - Learning to Program with Alice, 2nd Edition, by Dann, Cooper and Pausch. 
Office Hours
Tuesday and Thursday
7-8am and 11am - 12:30pm
And by appointment, of course

 
General Notes

Homework Assignments

Tuesday
November 17
Today's Topic
Variables in Alice.
Thursday
November 12
Today's Topic
The notion of vehicle in Alice animations.
Tuesday
November 10
Today's Topic
The Alice method orient to and the Alice parameter as seen by
Introduction to our Final Projects
Thursday
November 5
Today's Topic
Catching up on Tasks 4-8.  Please make sure that Preethi or I have seen these tasks run correctly.
Tuesday
November 3
Today's Topic
Events, chapter 5.  Events enable the user to interact with our animation.
Deliverable (Task 8)
Work in pairs to create the Greek tragedy described on pages 148-155.
When you are done, upload your world to both of your websites and send me an email
letting me know that you are done.  This is due by the end of the day today.
Thursday
October 29
Today's Topic
Inheritance and subclasses.  Poses in Alice
Deliverable (Task 7 - final version):
Using the bunny that you modified in task 7 Right-click on your bunny and rename it "DancingBunny." 
Then right-click on your bunny again and use the "Save Object" option to export this bunny to a new file.  Call this new file "DancingBunny.a2c."  When you are done, send this dancing bunny to me as an email attachment.
Tuesday
October 27
Today's Topic
Parameters in methods
Drop a rabbit object in your world.
For this rabbit, create a method called "dance"
Add two parameters to this method:  bHop and bSpin, both numbers
The method should make the rabbit hop "bHop" times and spin "bSpin" times. 
In your myFirstMethod, call the rabbit's "dance" method twice, with different sets of parameters.
Deliverable (Task 7 - first part):
If your project was not checked in class as done, please upload it to your website as task7.a2w
Thursday
October 22
Today's Topic
Putting finishing touches on Tasks 5 and 6.
Tuesday
October 20
Today's Topic
Summary of Alice chapters 1, 2, 3.  (If you didn't get notes on these, make sure that you copy the notes from someone else in class.  This will be very valuable going in to the next exam.)
Start of Alice Chapter 4:  Creating new methods.
Thursday
October 15
Today's Topic
while loops in Alice, camera motion, interaction with the landscape and proximity functions
Tuesday
October 13
Fall Break
No Class
Thursday
October 8
Exam 1.

Tuesday
October 6
Today's Topic
Write an Alice program that makes use of an if...else... block and/or a while loop.

Deliverable due by the end of Friday, October 9
Call your Alice program "task4.a2w" and upload it to your website.  You do not need to put a link to it, just make sure you do not save it in a subdirectory of your website.
Thursday
October 1
Today's Topic
Review for the exam.
Tuesday
September 29
Today's Topic
Making a character's legs turn while walking.
Thursday
September 24
Today's Topic
Introduction to Alice. 
Tuesday
September 22
Today's Topic
JavaScript, a bit about the Document Object Model (DOM), events.
We generated this page, whch should form the basis of Task 3, described below.

Deliverable, due Tuesday, September 29, by the end of the day
  1. Create a page called task3.html
  2. Create a link to this page from your homepage, index.html
  3. When task3.html is first loaded by the browser, an alert box ought to pop up saying "Welcome" and when the page is unloaded, another alert box ought to pop up saying "Goodbye."  These would make use of the "onload" and "onunload" events, probably in the <body> tag.
  4. The page itself should have a line of text with three buttons beneath it, as shown in the picture. 
  5. Picture of the Nim webpageWhen someone clicks the "More Xs" button, the number of Xs in the line should be increased by 2.  When someone clicks the "Less Xs" button, the number of Xs in the line should be decreased by 1.  When someone clicks the "Change X to Y" button, two things should happen.  The "X" characters in the line should all change to "Y" characters, and the text on the button should change to "Change Y to X".
Here are some ideas that can help:
  • If you give the button's <input> tag an "id" value, then you can refer to it in the same way as we refer to the paragraph on the web page.  This allows you to do something like "document.getElementById("MyButton").value = "Change Y to X";
  • More than one function can make use of a variable.  Thus, if the variable numberOfLetters holds the number of letters that should be drawn at each time, then you can have all your functions mess with this variable.  For example, one function can add to it (numberOfLetters = numberOfLetters + 1), one function can subtract from it, and one function can use it when drawing the string of characters. 
  • Note, however, that to share a variable among several different functions, you have to declare it at the top of your JavaScript, before you start any of the functions.  For example, the line right after "<script type="text/javascript">" would be "var numberOfLetters=10;"
Thursday
September 17
Today's Topic
Introduction to JavaScript.  As usual, we refer you to the W3Schools site for Everything You Need To Know.
Tuesday
September 15
Today's Topic
Cascading Style Sheets.  As usual, we refer you to the W3Schools site for Everything You Need To Know.

Deliverable
  1. Create a page called task2.html
  2. Create a link to this page from your homepage, index.html
  3. Create 3 pages table1.html, table2.html and table3.html, each of which contains at least one table (and anything else you wish) and which uses the style sheet style1.css, included by way of a <link ...> tag in the head
  4. Create a style file style1.css that describes some way to draw tables
  5. Copy those three table pages and save with new names table1a.html, table2a.html, table3a.html. These should be identical to the original three files, except that you should read "style2.css" in the <link> tag instead of "style1.css".
  6. Create a style file style2.css that describes a very different way to draw tables, that is, different from style1.css.
  7. Create links to these six table pages from your task2.html file
  8. Create links back to index.html from your task2.html file
  9. Create links back to BOTH index.html (this link should say "home") and task2.html (this link should say "task 2") at the bottom of all six of the table pages.
You can earn up to 20 points extra credit for using as many interesting style features in your style1.css and style2.css files. These can include table features, paragraph features, text features, etc... Each feature you use should show up somehow on at least one of your table pages. Let's say 1 point for each style feature you use.
When you are done, send me an email. These are due by the start of class on Thursday. In that email, let me know how many style features you used, so that I know how many extra credit points to assign.
Thursday
September 10
Today's Topics
The RGB color scheme, how to define colors in an HTML page, and the hexadecimal number system.
Thursday
September 3
Today's Topics
Go to ftp://personal.ecu.edu in Microsoft's Internet Explorer, and log in with Pirate ID, to upload files.
Create three pages:
  • index.html - This must have text at the top saying "CSCI1001" which links to CSCI1001.html
  • CSCI1001.html - This must have text saying "Task 1" which links to a page "task1.html", and also a link at the bottom linking to your home page.
  • task1.html - this has a 2x2 table with the information shown below, and also a link at the bottom back to your home page.
    name
    major
    date
    some picture
Deliverable
If you did not finish these three pages in class, please send me an email when you are done, so that I can check it out.  This should be sent to me by Tuesday, September 8.  If you need help, please post your questions in the discussion board on Blackboard.
Tuesday
September 1
Today's Topics
Introduction to HTML.  See w3schools for a reference.
Thursday
August 27
Today's Topics
The machine cycle:  Fetch -> Decode -> Execute repeat...
Machine code (see this page, particularly the example near the bottom) and ASCII (link)

Homework due Tuesday, September 1
Find the winning move from each of these Nim positions
10-10-8
5-6-7
21-33-47
Please write up the winning Nim moves and hand them in at the start of class on Tuesday.
Tuesday
August 25
Today's Topics
Introduction to computer architecture (document), Binary Numbers (link), the game of Nim (link)

Request space on the ECU Personal Server.

Go to the Help Desk, submit an "Online Request," and then select "Personal Website Space Request" on the list to the left.

Back to Home Page