assignments

**PREPARE FOR IB EXAM on 5/20/11.** Use these past exams for review: **Past Paper 1 HL Exams & Answers**
 * **Spring 2011** ||
 * Past Paper 2 HL Exams & Answers**

A left-most parity bit is used to verify that the data was transmitted correctly. [|Review parity bits]

__**5/13/11 homework:**__ Also: [|Network tutorial] - switches, routers, hubs, LANs, WANs, etc.
 * Read and Review the Paper 2 Exam I handed out.**
 * Read and Review the Components of Networks at the links below:**

Past Assignments:

**HOMEWORK** **DUE MONDAY, 5/5/11** Skip converting the binary sums back to decimal on the binary addition problems.

**DUE MONDAY, 5/16/11**


 * TEST TOMORROW 5/6/11 on Sorting and Searching**
 * Study Sheet:**
 * IB Computer Science Paper 1 & 2 Review Worksheets**
 * Open and do the following worksheets and assignments:**
 * 1) [[file:Sorting and Searching Worksheet.doc]]

References: [|Overflow reading] [|floating pt. numbers & binary]

[|Complete the exercises on this page-Bi Math Ans:]

Easter Break Test on Fri 4/15 on Case Study Vocabulary Words.
 * Due Wed. 4/13/11** - May 2008 HL Paper 1 Exam questions 17-22 - read up on#18 (hashing)


 * Due Monday 4/11/11:**
 * 1) Answers to May 2008 HL Paper 1 Exam question 17-22 - read up on #18 - hashing
 * 2) HW assignment - see Case Study home page for details
 * 3) **Study for TEST ON TUES. 4/12 on Case Study**
 * To Prepare - Read through:**
 * web site pages
 * discussion board postings
 * read the case study again and references

Complete all 10 Case Study Discussion Questions -
 * Due by Wed. 4/6/2011**

Homework for Friday 4/1/2011
 * 1) Go to the Paper2 - Case Study Link
 * 2) Look at prior Paper2 exams - the Markscheme has the answers for the exam. Note: The last half of the exam contains the case study questions.
 * 3) Create a question you think IB might ask on your case study Paper 2 exam.

**DOSSIER PROJECT DUE DATES:** Submit all parts in ONE DOCUMENT in the following order:
 * 1) **Analysis - which should have been completed before June 2010**
 * 2) **Design - due by Monday after Thanksgiving 2010**
 * 3) **Program - due first day after Christmas 2010 break**
 * 4) **Documentation** - **due after the Feb. 2011 break**

Spring 2011 1. Sorting and Searching Algorithms - know how they work and be able to list each round of sorting the data 2. Case Study Abbreviations & their definitions
 * COURSEWORK **:
 * TEST on Friday 3/25**
 * Topics:**

Find an article that that relates to your page topic. Post the link to the Discussion Board tab and give an overview of the information.
 * H.W. for Monday, 3/21**

--using a linked list to store and manage data as opposed to an array: If records are sorted they can be added/deleted more easily; Without having to re-sort/shuffle the records; Just by manipulating the pointers; ** Better use of memory; ** As records can be (dynamically) added/deleted;
 * 1) Data Structures - primitive data types and objects---what is stored in memory?
 * 2) Recursion - pg 913-925
 * 3) **Dynamic Data Structures** (Linked Lists, Double linked lists & Circular Linked Lists) **which are used to create Abstract Data Types(ADTs)** - (Stacks, Queues & Binary Trees)
 * 4) Converting arithmetic expressions from prefix to postfix
 * 5) Test on Friday 2/28/11 on above topics. Note the following points below:
 * Advantages/disadvantages** of
 * No wasted space (as in an array); **

--using a binary tree(doubly linked list) to manage data as opposed to a regular linked list: Faster retrieval of data; Especially for large number of nodes/data items; As less nodes to search; Particularly if tree is well-balanced; Some operations are more complicated to program than for a linked list e.g. deletion

--program execution and keeping track of the line of code in RAM that should be executed next ** The return address would be stored in the stack; ** --evaluated arithmetic expressions. --Push onto the stack, Pop out of the stack.....last in first out (LIFO) --servicing hardware requests by forming a line ...first in first out (FIFO)
 * Stacks are used for:**
 * This address would be popped back into the program counter once the subprogram has been completed **
 * Queues are used for:**

6. Know the Searching and Sorting Algorithms for test on Wed 3/16. Know how they work:

FALL 2010
 * PROGRAMMING and Writing Assignments **
 * Textbook Assignments - You are responsible for the following Chapters to date:**
 * 1) Chapter 1 - 10/7 & 8
 * 2) Chapter 2 - 10/12 - 10/22


 * Discussed TOPICS ** **-** **To day you are responsible for the following topics listed on navigation bar at left:**
 * 1) Computer History
 * 2) Language Translators
 * 3) CPU & Machine Cycle
 * 4) Program Execution Demo
 * 5) IAS
 * 6) Computer Memory
 * 7) Microprocessor
 * 8) Peripherals
 * 9) Recent Developments
 * 10) Operating Systems- **TEST1 - marking period 1**
 * 11) Data Processing Types
 * 12) Reliability
 * 13) Networked Computer Systems Basics**- Test2 on Monday, Nov. 8, 2010 on 11-13 above**
 * 14) Software
 * 15) Applications
 * 16) Browser & Search Engines **- Test3 on Friday, Nov. 12, 2010 on 14-16 above**
 * 17) Data Representation - Number Systems
 * 18) Analog/Digital Data
 * 19) Data Errors
 * 20) Software Utilities
 * 21) Computer Memory
 * 22) Hard Drives
 * 23) Binary Addition
 * 24) Hex Addition (Convert to binary and add) [|Hex]
 * 25) Two's Compliment (to handle signed numbers) Visit: [|Two's Compliment Video]
 * 26) [|Bit overflow in binary addition]
 * 27) Know the minimum and maximum signed number representations in a n-bits. Represent it in binary and decimal.
 * 28) Convert Binary to Hex, Binary to Decimal, Decimal to Hex, Decimal to Binary, Hex to Decimal, Hex to Binary - //Test4 will include all topics from last test listed above. Also revisit and know: fetch and execution cycle (click on: Program Execution Demo link on Navigation bar at left), the differences between: batch, real-time and online processing, what a run-time error is and what might cause one/how to avoid// **- TEST4 on Thursday, Jan. 6, 2011**
 * 29) **READ THE CASE STUDY** and start doing research on all related topics! See link at top left.
 * 30) **Test on Friday 1/21/11** on the topics Decimal to Floating Point Conversion, Boolean Logic: Know how to set up a truth table, simplify a Boolean expression, draw the corresponding circuit, state the Boolean expression of a circuit, convert a decimal number to a binary number, two's compliment (signed numbers), know the parts of a multi-disc hard drive.

=Summer Class Assignments=
 * My Email Address is:** dbutera2@schools.nyc.gov

** FIRST: ** HERE IS THE CORRECTED RW.java code. It's important that you download it and view it so that you can clearly see the class methods within before you proceed forward! View the source code, compile and run it. **SECOND: Download, read, compile and run this program to see how it works.** Make sure you write to the file so that it has data in it before you search on or delete records. This program basically takes the skeleton of RWcorrected.java and makes it functional. I gave you the stripped-down version above so you can clearly see the code for the beginning and end to each method. NOTE THE modules: DeleteRec & ModRec. Understand the code....read the comments. Note that this code does not handle all invalid user inputs. It needs to be improved upon.

**DUE DATES**
**1. Due end of June: A Section - Analysis - Include the user feedback. Everyone should email it to me.** **2. Due end of July:** B Section - **Design** - of the Dossier **3. Due end of August:** C Section - **Programming** - of the Dossier Submit these to me as email attachments.
 * See the Dossier Link for detailed instructions.**
 * Make sure you read and refer to the Official IB document and my grading rubric for guidance!**

To program in Java on a Mac: http://www.cs.princeton.edu/courses/archive/spr04/cos126/hello/mac.html From a Macbook: 1. Open a Terminal Window(Finder-->Applications-->Utilities-->Terminal) 2. Type in: vi HelloWorld.java (just like in class) 3. Google "java helloworld" 4. Copy and paste that code into vi. Esc, :wq .....to save and quit 5. Compile and execute it When you open a Terminal window, the default location is your home folder. To get to your home folder: 1. open finder 2. click on the Macintosh HD link at the top 3. click on the Users folder 4. click on the icon that looks like a house (it would have your name under it if the computer was set up as yours) 5. you will see the HelloWorld program and its class there
 * For Kieran:**

PRIOR WORK:

LAST CLASS ASSIGNMENT DUE BY WED. JUNE 19TH!

Copy this code into RW.java and try to get rid of the errors by creating the necessary methods . Right now you will get errors because the methods called on in the if statements do not exist in the RW class. You need to create them. Inside each method just output a statement that tells you which method you are in and call the Intro method again. To end the program, use this statement: System.exit(0); in the Quit method. Email me if you have any technical problems. **EMAIL ME YOUR WORKING COPY** as an attachment to the email at the top of the page import java.util.Scanner; import java.io.*; class RW { static String ch,input; static void Intro{ System.out.println("\nMain Menu:\n\tEnter \"1\" to Enter data into our file,"); System.out.println("\tor, \"4\" to quit\n\n"); try { Scanner input= new Scanner (System.in); ch = input.nextLine; if(ch.equals("1")){ Write2File; } if(ch.equals("2")){ SearchFile; } if(ch.equals("3")){ DeleteRec; } if(ch.equals("4")){ Quit; } else{ Intro; } }catch (Exception e){//Catch exception if any System.err.println("Error: " + e.getMessage+"\n"); } }  public static void main(String args[]) { Intro; } }

Due Friday June 4 Next week you will have a test on flowcharting and on your understanding of the program: ReadWriteFile4.java

Create a flowchart that represents the following algorithm: Determine if the user wants to enter another client If so, Ask for the client's name and sex otherwise end the program If the client is a female, increment female record count and write the record to female.txt If the client is a male, increment male record count write the record to male.txt Reference flowcharting symbols on the web if you need to help. Test your flowchart with both male and female test data. Does it work? Great! If not, something is wrong. Redo your flowchart.

Download free flowcharting software. Go to [|www.tucows.com] and download Diagram Designer. [] Use this software to create your flowchart. Save, print and bring it in to school on Friday.

DUE on Tues. June 1,2010:

1. Corrected Analysis. Be sure to read the 3 criteria you will be graded on. Once done, discuss it with your user and get feedback. Feedback will be the last part of your Analysis. 2. Download this ReadWriteFile.java program: and save it to your USB drive. 3. Compile and run the program to see the outputs. Make sure you have data in your data.txt file. If not, select 1 when you run the program and add data. 4. Read ALL the comments in the program. 5. Modify the program. Comment out all my "data dump" outputs in the SearchFile method. 6. The final output should be only 1 of two:

Display the matching record and the message: There is a Match OR the message: No Match

7. I want to update the Linux OS on your USB stick this Tues. To prepare for that, boot up in Linux and copy all the programs you currently have in your **Places-->Documents** folder onto the smaller storage area outside your OS (in the storage area where I put the files from the classroom server). When I replace the OS you will lose everything that is in the Places-->Home folder....which includes Documents where I believe you have been saving your classwork. 8. Download a Flowcharting tools to use for the Design Phase of your Dossier at: []

Make sure you understand what all the sections of the program does. You will asked to describe what each section does on a test next week. Be prepared to ask questions on Tues. and demonstrate the modified program above.

FILL OUT:


 * []**

TEST on Tues. June 1 - on Lesson 8 & Lesson 9 (Arrays and File I/O) Know the vocabulary and all the points made on the lesson pages. **Understand how the ReadWriteFile3.java works!**

DUE FRIDAY May 21, 2010:

> > > Correct your Analysis and resubmit it on Tues. May 11. > Define vocabulary up to Lesson9 - File I/O > Go to Lesson9 and understand File I/O, searches and sorts for test. > > Due by Wed. Apr. 28, 2010 -
 * 1) You must have your ReadWriteFile4.java program displaying ALL fields in the record by Friday for full credit.
 * 2) Your CORRECTED Analysis must be submitted by Friday if you don't want to be penalized!
 * 1) All vocabulary should be updated up to Lesson 7.
 * 2) Do the following first step in the Dossier: The Analysis
 * 3) Refer to the example Dossier handout I gave you. Also click on the Dossier link **on the navigation bar at left for more information and examples. Open this doc and** read the IB grading rubic and examples of the Analysis stage on pages 67-90: **[|d_5_comsc_tsm_0505_1_e.pdf] . FOLLOW THIS GUIDE!**
 * 4) ANALYSIS IS DUE BY Wed. APRIL 28! **- THIS IS YOUR HW BETWEEN NOW & THEN.**

Fri. 3/19/10 classwork:
 * Visit "How things work". Pick a computer related topic. In a Word document, give a summary of your topic and list 3 new things you learned and 3 new technology terms with their definitions.**

Wed. 3/17/10 classwork:


 * Read:[|Algorithms & Encryption] about** Algorithms **& then go to bottom and click on link "**How Does Encryption Work?" **and read about encryption.**
 * In a Word document answer and bring to class on Thurs. for credit:**

Define:
 * Algorithms**
 * Encryption**


 * What did you learn about encryption - list 5 things. List current applications of encryption. How do we how if the web page we are sending is encrypted?**


 * Past Assignments:**

Due by March 1

 * 1) Make sure the Vocabulary **for lessons 1-6 on the navigation bar are defined on** your wikispace **. Put all definitions on a Glossary Page and organize them by Lesson.**
 * 2) Post the link to your wikispace's Glossary Page on the Discussion Tab above.
 * 3) Get Eclipse to work at home.
 * 4) Make sure you had in Paper1 from HW.

GOALS: Download and save this sheet to your class folder. Open and pick three goals for yourself this term. Memorize them!


 * Link to the GUI class BreezySwing: [|breezyswing]**

TEST on Fri., 1/15/2009 Click on the Glossary Link and learn all terms under the Letter A.

Test on Tues. Nov. 24th. You must know that the following terms are:
 * 1) Java - when was it developed and by whom
 * 2) OOP
 * 3) source code
 * 4) JVM
 * 5) byte code
 * 6) compiler - a compiled language (whole program is compiled into binary or byte code, then that file is executed)
 * 7) interpreter - an interpreted language (each line of the program is converted to binary and then executed, line by line)
 * 8) application software
 * 9) operating system software
 * 10) syntax error
 * 11) logic error
 * 12) program statement
 * 13) operand
 * 14) operator
 * 15) Java applet

Due Monday Oct. 5 > || 8 || Complete Java Programming Assignments #1-8 **listed on the class server's web page.** > To do so:
 * Assignment No. || Assignment Description || Due Date ||
 * 1) Do Lesson 2 in the Syllabus. All your answers should be listed on your Lesson 2 page of your wikispaces just as you have done above for lesson 1.
 * 2) Post the link to your Lesson 2 page on our class wikispace by doing the following:
 * 3) Click on Syllabus-->Lesson2-->Discussion Tab
 * 4) Type you full name in the subject window
 * 5) Paste the link to YOUR Lesson 2 wikispaces page in the main window.
 * 6) Confirm the link works.
 * 1) Logon to the server (follow the steps outlined in Assignment #7 above).
 * 2) Open Firefox and type in the server's IP address in the browsers address window.

Completed Assignments ||

> || 1 || Your wikispaces will automatically create the appropriate pages and link to them to your navigation bar. During the class you will be modifying each page to include lesson work and to add technical terms and their definitions on the Glossary page. || First week of class || > || 2 || Download and compete assignment. **|| ||** > || 3 || Explore 3 different Linux Live CDs**. Download and complete the assignment. To determine the desktop environment, do a search on "Linux desktop environments" and click on the wikipedia link. || Sept. 18, 2009 ||** > || 4 || Read "20 Reasons to Convert to Linux" and post
 * 1) Create a wikispaces account
 * 2) Create a wikispace named: YourFirstIntial & YourLastName & "_IBCompSci**" For Example:** DButera_IBCompSci
 * 3) Modify your navigation bar to add the following page links and pages:
 * 4) Lesson1
 * 5) Lesson 2
 * 6) Glossary
 * 1) **Read 20 Reasons to Convert to Linux at:**
 * 2) **http://www.bellevuelinux.org/reasons_to_convert.html**
 * 3) **Post here on the Discussion Tab above: 3 reasons that would inspire you to convert.**
 * 4) **Type "  - 3 Linux reasons" in the Subject window**
 * 5) **Type your 3 reasons that might make you think about converting to a Linux OS in the main window**

> || 5 || > || 6 || LEARN the VIM Text Editor
 * 1) Do Lesson 1 in the Syllabus. All your answers should be listed on your Lesson1 page of your wikispaces. For all lessons, do the following:
 * 2) Copy and paste the questions.
 * 3) INCLUDE the lesson's sub-headings when you answer the questions.
 * 4) Answer in FULL SENTENCES.
 * 5) Post the link to your Lesson1 page on our class wikispace by doing the following:
 * 6) Click on Syllabus-->Lesson1-->Discussion Tab
 * 7) Type you full name in the subject window
 * 8) Paste the link to YOUR Lesson1 wikispaces page in the main window.
 * 9) Confirm the link works.
 * 1) **Visit the site [|VIM Tutorial] and**

read **down to** Advanced "vi" features. > Boot your machine with the assigned LiveCD > Open a terminal window (a shell): Applications-->Accessories-->Terminal > Type in the window: ssh @ > You will be prompted 2 times for your password **(**9-digits student ID, **and then you should be on.** > In the terminal window type: vimtutor > Begin lesson and take notes! You will be able to use your notes to take the VI test.** VI is a text editor that is always available when you logon remotely to a organization's server. Sometimes no other editor will be available. That's why we will learn VI first and later progress to another text editor. It may seem primitive at first, but you will get used to it. To learn VI you will go through VIMTUTOR. This is a tool to learn VI. When you are done with all the lessonsin VI, you will take a written test. You must score over 80 on this test. If not, you will go through VIMTUTOR again and take another test. You will not know what you got wrong on the first test so take good notes!!!!
 * Your loginID = the first letter of your first name + your last name **(no spaces)**
 * Server's IP Address **will be written on the top of the board**