Links : IA
Project
Info IBO
Documents IB
Syllabus ***************************
|
Next Assignments : Exams in May |
Paper 1 - Friday afternoon - write PSEUDOCODE
Paper 2 - Monday morning -
FIS students MUST answer Object Oriented Programming
questions (section D) - and write JAVA code
Paper 3 (HL) - Monday afternoon - read the CASE STUDY again before the exam
We will have a REVIEW SESSION from 13:00 until 17:00,
hopefully covering the entire CORE syllabus (Paper 1),
and maybe a couple other things. Meet in room 276
at 13:00 and bring your laptop.
[HL] - Vocabulary and definitions for the case study
Any questions?
SL - Suggested Review for Today
Programming Concepts Vocabulary (Read this, learn the words)
Pseudocode
Practice Tool (Read
sample algorithms, make changes, test)
Pseudocode
Notes for Exams
Pseudocode Explanations (not in exams)
HL - Continue review of Case Study for Exam Paper 3
Buffer Overflow Exploit (read only - don't try it)
Root privilege , Linux , Apache Web Server , built in security, Windows XP
Syllabus Notes for Topic 2 - Computer Organization
Core
Summary Questions HL
Extension Questions All
Question with Answers
Vocab
Interactive(download, run .jar file)
Guide (syllabus) = look at Topic 2
Here are
the notes from the old syllabus - they are still clear and useful.
Spend an hour reading these notes, starting at the CPU
(3.2)
and finishing at 3.5 analog
and digital data
This looks like a pretty good vocabulary list.
Here is another vocabulary list with blurry text.(not really for IB, but still useful)
Here is an unfinished Wiki about IB CS - the finished parts are good.Do as many of these exercises as possible (you won't finish all of them).
If the first ones are too easy, start with the harder ones.
None of these involve INPUT - and OUTPUT can be done
with System.out.println. You can write these in BlueJ,
then the output will show up in the Text window.
- Start with 10 numbers in an array :
int[] nums = {5,7,4,8,9,1,6,4,2,0};
Add up all the numbers that are larger than 5.
- Start with 10 numbers in an array.
Find the largest number and the smallest number,
subtract them and print out the result - that is the
"RANGE".
Homework : Add a changecoach() method to the Team
class,
as well as a corresponding command in the user interface.
Learn
Algorithms
These algorithms are from the old syllabus, but they are still useful for
practicing Java programming. You probably don't need to do the
really simple ones (like adding fractions), but searching, sorting
and the Dinner Party algorithms are useful.
(1) Quiz about Cafeteria System Design
(2) Homework - read 2011 Paper 2 #2Download and extract this LinkedListPhones.zip archive.
This is a NetBeans project, containing a LinkedList that keeps
track of phone calls - phone numbers and times.
You should read the notes and do the practice exercises
written at the top of the java class.
Complete this during class:
Homework (you can start during class):
Paper 2 in Specimen Exams 2014
Paper 1 (HL) #13 in Specimen Exams 2014
We will discuss the sample algorithms in Pseudocode Practice Tool
Homework - Read Paper 1 (HL) #13 in Specimen
Exams 2014
We will discuss question #13 tomorrow during class.
Here are the answers we wrote in class:
#15 (ai) on/off switch (aii) when the temperature is too hot or cold (b) switch to turn the system on and off dial - for maximum thermal sensor (c) loop while SWITCH = true MINIMUM = dial.getMinimum() MAXIMUM = dial.getMaximum() TEMPERATURE = sensor.getTemperature() if TEMPERATURE < MINIMUM then HEATER.set(on) FAN.set(off) else if TEMPERATURE > MAXIMUM then FAN.set(on) HEATER.set(off) else HEATER.set(off) FAN.set(off) end if end loop (d) advangages fewer settings to adjust cheaper/simpler to install and maintain everybody is equal disadvantages need connections like cables if central control breaks, bigger problem the central program is more complex ===================== #14 (a) Game, Browser, Youtube video (b) Multi-tasking - splits the processing cycles (time) between the apps Memory Management - allocating memory Moves apps from permanent storage to RAM Switches the display between apps as needed (c) Power consumption - keep power consumption low to preserve the battery and reduce the heat Permanent storage - shouldn't be a spinning hard-disk must be small enough to fit in the phone (d) It better be a chip, not a card. Good - better graphics more desirable - get more users enable 3D games Bad consumes more power produces more heat make the phone bigger make the production more complex redesign the OS |
Homework - become an Expert at the Pseudocode Algorithm that you
chose.
Pseudocode
Practice Tool
(11)
Assume that a bank director wishes to be able to work from home. (a) Outline one advantage and one disadvantage of using a wireless (WIFI) connection at home.
(b) Outline one advantage and one
disadvantage of using VPN.
(c ) Explain why he might be able to work WITHOUT using HTTP. (d) Explain why the documents probably contain ASCII codes. (e) Outline 2 ways that ENCRYPTION might be used in this system.
|
Project Presentation Meetings :
Each student must present his/her project to the teacher in a 20 minute
meeting.
We need to schedule these meetings.
Alex - 13 Mar 9:40 Martin - 17 Mar 14:45 Tanmay - 14 Mar 12:55 Yasin - 14 Mar 12:30 Philipp - 13 Mar 10:05 Evan - 12 Mar 13:25 |
Alexandros - 19 Mar 8:40 Julius - 10 Mar 9:40 Jonas - 20 Mar 10:50 Jeong-Hwan - 20 Mar 11:20 Jun Hyung - 17 Mar 14:20 Sunyong - 18 Mar 11:45 Cody - 21 Mar 13:30 |
-- Algorithmic and Computational Thinking --
Guide (syllabus) - Section 4.1
You have been engaged in Algorithmic and Computational Thinking
all during this course. Now you must take a meta view
of what
your brain is doing when solving problems and designing computer systems.
We will discuss this next week. Today, answer this question:
Somebody or some system needs to schedule the
meetings for the individual project presentations. Suggest algorithms (methods) that could be used by: (1) the teacher - or - (2) the IBDP Coordinator (Mr Toyne) - or - (3) a computer program Explain why the 3 different "problem-solvers" might use different algorithms. You may wish to start by considering: Input-Processing-Storage-Output |
-- Sample questions about Network Fundamentals --
Answer these practice questions about Network Fundamentals:
Discussion
Questions
(0) Specimen Exams 2014 - Look at Paper 1 Question #9
(1) Explain 2 differences between the World-Wide-Web and a Wide-Area-Network. (2) Outline a sensible SECURITY system for use in a Peer-to-Peer network. (3) The OSI Layers model is supposed to provide standardization for Network communications.
Explain why other standards like
ASCII, UNICODE and HTML are still needed, even though (4) Explain why SOFTWARE is more important than HARDWARE when setting up a VPN. (5) Explain why WIFI and VPN might BOTH be needed to provide mobility for some users. (6) Explain the different roles of HTTP and HTML in the World-Wide-Web. (7) Oultine 2 advantages that make Optical Fibre better than Copper Cables for outdoor use. (8)
Outline the most important difference between how SMTP transfers
email (9) Explain the importance of check-sums ina packet-switching system. (10)
Explain two essential differences between MAC security and
userID security ~~~~~~~~ (11)
Assume that a bank director wishes to be able to work from home. (a) Outline one advantage and one disadvantage of using a wireless (WIFI) connection at home.
(b) Outline one advantage and one disadvantage
of using VPN.
(c ) Explain why he might be able to work WITHOUT using HTTP. (d) Explain why the documents probably contain ASCII codes. (e) Outline 2 ways that ENCRYPTION might be used in this system. ~~~~~~~~ |
3.1.14 - Future wireless networks ??
Tomorrow we will discuss Topic 3 in the IB Computer Science Guide. You should read Chapter 15 in Computer Science Illuminated.
Finish the project. It's due on Monday 3 March -
that is the first day after the vacation.
If you need help with technical details like
how to make a video, you need to ASK FOR HELP.
You must use this
folder structure and cover page
for turning in your IA project. You will receive a
USB stick with this folder structure pre-copied.
If you need a new copy, download the .zip file above
and unpack it.
Your IA project is due on Monday 3 March.
You must submit the USB stick that you received,
with all your files on it. Make sure that all the links
from the cover page work, and that you have copied
your Java folder into the PRODUCT folder.
If you wish, you can provide instructions for
loading your program - there is a box on the cover page.
SL - Continue working on your IA Project
HL - Specimen Paper 1 - #11
About Collections and 2D Arrays
A COLLECTION is the Pseudocode version of a Vector
References -
Read about COLLECTIONS in the Pseudocode
Explanations
Pseudocode
Practice Tool - look at Names_Collection
Do these problems without using a computer.
Here are the teacher's answersWe will discuss the use of STACKS in the INTERNAL WORKINGS of a programming language.
You might want to read in your textbook: sec 7.6
Homework :
Predict what will be printed by this method.
Then run it in Java and check your prediction:
printBackward(10) printBackward(int start) { print(start) if ( start > 0 ) { printBackward(start-1) } print(start) } |
Initial part of Stage C - turn in the following:
- a FUNCTIONING copy of your program,
that the teacher can RUN on his computer
- a clear explanation of TWO ALGORITHMS
(the most interesting ones) that demonstrate COMPLEXITY
Include Java code if that makes the explanation easier.
But the EXPLANATION includes the PURPOSE of the code -
it is not just an English translation of the code.
- SCREEN-SHOTS showing that the TWO ALGORITHMS (above)
functioned correctly achieved their purpose
We will finish the rest of Stage C next week.
Work on your Java Program for the Internal Assessment project.
Use the opportunity to get help. Make sure you make
useful progress each day.
We will discuss the Case
Study further today,
as well as review the Mock Exam Paper 3.
Now that mock exams are over, it's time to concentrate
your efforts
on the Internal Assessment Project for IB Computer Science.
In January, you will have most (perhaps all) of class time to devote
to writing the Java program for your Internal Assessment
Project.
Plan on bringing a working laptop with your project program
to class every day. This class time alone will probably not be
sufficient to finish the program, so you should plan on also
working at home during January, and possibly doing some
work
ahead of time (if you have not done so already).
Most of the Stage B Design documents were fine - you should read
the teacher's comments in Haiku. It is not necessary to make
any improvements in your Stage B document at this point,
but if you think the grade you received was unfair,
you should discuss it with the teacher. The teacher will be
reviewing these anyway during the break, and some grades
may be raised.
Your working Java program will be due at the end of January.
The stage C Development documentation is due on 3 Feb.
You should probably consult the IA
Documentation to see what Stage C looks like.
To review/practice for the Mock Exams, the following are suggested:
Paper
1 Sample mock exam Paper
1 Sample Mock Exam with answers
Pseudocode
algorithm examples. Pseudocode
Practice Tool
Specimen Paper 2 (distributed on paper)
Java
algorithm practice Do some practice Java programming (in
NetBeans or Processing)
[HL] read the Case
Study to prepare for Paper 3.
Review class blogs:
2012-2013
Blog 2013-2014
Blog (this page)
Read your own notes
Not useful for review, but read it if you wish:
JETS.pdf
[HL] notes from today
boolean removeBus(int pos) { if(pos==0) { head = head.next; return true; } Node temp = head; for(int c=0; c < pos-1; c++) { if(temp!=null) { temp = temp.next; } else { return false; } } temp.next = temp.next.next; return true; } class Node extends Bus { Node next = null; } FOR EXAMPLE: if ID's are 1000...2000 1500 1250 1750 1125 1375 1625 1875 etc. Start with the "middle" id at the ROOT, make a proper binary-search-tree and it should be balanced so that it is efficient O(log2(N)) whereas a linear search takes O(N) insert(new Node(5000), ROOT) insert(Node NN, Node HERE) { if( HERE==null ) { ROOT = NN; return; } if(NN.id<HERE.id) { if(HERE.leftChild==null) { HERE.leftChild == NN; } else { insert(NN, HERE.leftChild); } } else if (NN>id > HERE.id) { if(HERE.rightChild==null) { HERE.rightChild == NN; } else { insert(NN, HERE.rightChild); } } else { output(error); return; } return; } Disadvantages - difficult to write - uses more of the STACK - not noticeably slower |
Here is a copy of the Paper 1 Sample Mock Exam with answers
We will discuss problems #3 and #4 on the Specimen Paper 2 handed out
yesterday.
Question 3d notes:
Below is Java code for two of the new Bus classes. This is not required - we did it as a thinking exercise. Your answer only requires the CREATION header for each VARIABLE and each METHOD, as shown a the right. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ public class UrbanBus extends Bus { public UrbanBus(int i, String d, BusRoute r) { super(i,d,r); } } ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ public class SmallerBus extends Bus { private String cashier ; public SmallerBus(int i, String d, BusRoute r, String n) { setId(i); setDriver(d); setBusRoute(r); setCashier(n); } public void setCashier( String name ) { if( !name.equals(driver) ) { cashier = name; } else { } } public String getCashier( ) { return cashier; } public String toString() { return super.toString() + " Cashier:" + cashier; } } |
Your answer should contain DIAGRAMS as shown below - one box for each new class
|
Handed out on paper
Problems #17 and #18 on this c.
Case Study
Don't forget that HL has a Paper 3 about the Case
Study.
The Mock Exam Paper 3 will not be as detailed
as the real exam will be, as we have not had
much time to study this. Nevertheless, you
must make sure you understand all the following terms:
Bots, Botnets, BYOD, DoS attacks, clients, servers, firewalls,
malware, man-in-the-middle, packet-filtering, proxy servers,
spam, SSL, vulnerabilities, virus scanners, zero-day attacks
You should do some practice and review with algorithms.
In Paper 1, you must read (and should write) Pseudocode.
Try do some practice with these Pseudocode
algorithm examples.
If you are "hooked on Java", you might want to try this
Java
version of algorithm practice .
Here are some STANDARD ALGORITHMS that you should be
able to read or write quickly and easily during an exam.
You might wish to try writing these algorithms quickly
in the Pseudocode
Practice Tool
Loops |
Arrays |
if..decisions |
Collections |
Add up a sequence of numbers like 1+3+5+...+99 Count backward from 100 down to zero Output a sequence like 1,2,4,8,16...1024 Count in a cycle like 1,2,3,4,1,2,3,4,... Add up numbers until a specific total is reached, like 1+2+3... until >1000 Print the Fibonacci sequence 1,1,2,3,5,8,13,21,34,55... where each number is the sum of the two previous numbers |
Search for a value in an array(linear or sequential search) Bubble sort Count all the numbers in a specfic range, like between 50 and 100 Find the largest or smallest number in an array Add 5% to every number in an array Search for duplicate entries Reverse the order of the items in an array Insert a new item in the middle of an array In parallel arrays, find a value in one array and output the corresponding value in the other array |
Decide whether a number is even or odd Decide which one of 4 numbers is the largest Decide whether a number is in an expected range, like an AGE is between 1 and 99 Decide whether two Strings have the same first letter (using a "firstLetter" method) Decide whether one number is a factor of another (using the mod operator) Decide whether 2 numbers match in a set of 4 numbers |
Output all the items in a collection Search for an item in a collection Count the number of items in a collection that match some criteria, like >50 === 2D arrays === Search for an item in a 2-D array Add up a row in a 2-D array Search for matching neighbors in a 2-D array |
We will continue reading through the old
mock exam.
Stage B of your Internal Assessment Project is due Monday 18 Nov 2013.
We will work on this during classes this week.
Here are a few links that may be helpful
Checklist
(IBO) Assessment
Criteria (IBO)
Sample Projects : 4
Color Map in Python Mancala
Game in Scratch
Suggestions:
Record of TASKS :
Download
this document and use it - this is a requirement.
Include all the tasks you have
completed so far, as well as
a reasonable guess at tasks you
will complete in the future.
Here is an example: Record
of tasks for 4-Color Map Problem
DESIGN overview - be sure to include the following (your grade will depend on it):
Style : Use Tables,
Bullet-points, Diagrams to keep the reading requirement at a low level.
Look at the
SAMPLE PROJECTS and make yours look like that.
Needs/Goals : Include
diagrams that show either what the user will see,
or data and input/output from
the original problem - preferably BOTH.
Solution Overview : Include
either a large flowchart or a top-down-design-structure-chart
to show an overview of the
LOGIC of your solution.
Algorithms : Include
pseudocode (or Java code, or clear explanations) that illustrates automation
-
this is to ensure that a high
level of complexity or ingenuity will be achieve in the final
product.
Do NOT copy long program
listings here - stick to complex or ingenious algorithms.
Tools/Techniques : Identify
some specific techniques (Java commands or other technical
tools)
that will be used to improve the
functioning of the product.
Testing
: You do NOT need a TESTING plan at this
time - we will add that later (in January).
Make some references (at the
beginning or end) back to the success criteria
mentioned in Stage A.
B Solution
overview (c) IBO - IA Project Student
Checklist
|
|
Record of tasks - Download
this document
Examples - 4
Color Map in Python Mancala
Game in Scratch |
|
The Record of
tasks form has been used. |
|
The Record of
tasks form refers to the product proposed in criterion A. |
|
The Record of
tasks form has been updated during the lifetime of the
solution. |
|
The Record of
tasks form provides a realistic plan and timeline for
managing the solution, including the gathering of necessary
information, the development of the product and the testing
process. |
|
Design overview |
|
The designs refer to the
proposed product identified in criterion A and the Record
of tasks form. |
|
The designs include a range
of design levels. |
|
The design identifies a
range of appropriate techniques and original thinking that will
be used in the development of the product. |
|
The designs are in
sufficient detail to indicate how the product will function. |
|
The test plan proposed
addresses the main types of test appropriate to the product and
relates to the specific performance criteria identified in
criterion A. |
|
Mancala
Video of product |
Video
of product - Australia Input Video of product - Australia Run 1 |
||
Mancala Design | Video
of product- Australia Run 2 4 Color Map Design |
||
B Solution
overview (c) IBO - IA Project Student
Checklist
|
|
Record of tasks - Download
this document
Examples - 4
Color Map in Python Mancala
Game in Scratch |
|
The Record of
tasks form has been used. |
|
The Record of
tasks form refers to the product proposed in criterion A. |
|
The Record of
tasks form has been updated during the lifetime of the
solution. |
|
The Record of
tasks form provides a realistic plan and timeline for
managing the solution, including the gathering of necessary
information, the development of the product and the testing
process. |
|
Design overview |
|
The designs refer to the
proposed product identified in criterion A and the Record
of tasks form. |
|
The designs include a range
of design levels. |
|
The design identifies a
range of appropriate techniques and original thinking that will
be used in the development of the product. |
|
The designs are in
sufficient detail to indicate how the product will function. |
|
The test plan proposed
addresses the main types of test appropriate to the product and
relates to the specific performance criteria identified in
criterion A. |
|
More about Usability - sec
1.2.12-1.2.16
// This is an example program that
implements a BINARY SEARCH TREE // using a DYNAMIC data structure (use pointers) //================================================ public class BinTree { public static void main(String[] args) { new BinTree();} class Node { String data; Node leftChild; Node rightChild; } Node root ; public BinTree() { makeTree(); showTree(root," "); } public Node makeTree() { root = new Node(); root.data = "Chancellor"; root.leftChild = new Node(); root.leftChild.data = "Vice Chancellor"; root.rightChild = new Node(); root.rightChild.data = "Verteidigung Min"; root.leftChild.leftChild = new Node(); root.leftChild.leftChild.data = "Sec Vice Ch"; root.leftChild.leftChild.leftChild = new Node(); root.leftChild.leftChild.leftChild.data = "Coffe Clerk Vice"; root.rightChild.leftChild = new Node(); root.rightChild.leftChild.data = "General"; root.rightChild.rightChild = new Node(); root.rightChild.rightChild.data = "Admiral"; root.leftChild.rightChild = new Node(); root.leftChild.rightChild.data = "Child of Vice"; return root; } public void showTree(Node here, String indent) { System.out.println(indent + here.data + " "); indent = indent + " "; if (here.rightChild != null) {showTree(here.rightChild , indent);} if (here.leftChild != null) {showTree(here.leftChild , indent);} } //---- Write your program above ------- //---- Below are simple input and output methods ---- static void output(String info) { System.out.println(info); } static void print(String info) { System.out.print(info); } static void output(double info) { System.out.println(info); } static void output(long info) { System.out.println(info); } static int inputInt(String Prompt) { int result=0; try{result=Integer.valueOf(input(Prompt).trim()).intValue();} catch (Exception e){ result = 0;} return result; } static double inputDouble(String Prompt) { double result=0; try{result=Double.valueOf(input(Prompt).trim()).doubleValue();} catch (Exception e){ result = 0;} return result; } static String input(String prompt) { String inputLine = ""; System.out.print(prompt); try {inputLine = (new java.io.BufferedReader( new java.io.InputStreamReader(System.in))).readLine();} catch (Exception e) { String err = e.toString(); System.out.println(err); } return inputLine; } } |
Tree Traversals and Formula Trees
SL students - continue programming
HL students
We will discuss the concept of a
DECISION TREE,
and construct a simple Java program that implements it.
Here is an extremely FLEXIBLE Tic-Tac-Toe board.