IB Comp Sci SL y2 exams 2019 
 
LINKS:  Last Year's Blog   Lewis+Loftus-Java   Java Tutor   Comp Sci Illumin Book 
              Basic Java Lessons   Java OOP   JETS    Internal Assessment Java Notes   Java How-To 
                Vocabulary   IB CS Course Guide     Pseudocode     Notes and Review 2019
  IB Comp Sci Hub

 
Due Dates :  Preliminary Working Version of IA Program - due Wed 21 Nov
 

Preparing for Mock Exams - 27-29 Nov 2018

Here are some suggestions for preparing for your Mock Exams.
In each case, the SL exam excludes the last couple of questions.

- Old mock exam from Dec 2017 (SL = 1-14):
  Paper 1 : http://ibcomp.fis.edu/2017/mockDec2017/mockP1HL2017.pdf

- Old mock exam from Dec 2014 (SL = 1-13):

- Old mock exam review from 2013 (SL = 1-16):

Notes and Review 2019 - past exams from 2014-2017
   You can use the past papers to practice for Paper 2 OOP Java.



Answers for Past Paper 2 - 19 Nov 2018



Reviewing for Mock Exams - 14-15 Nov 2018

We will discuss a past Paper 2 - OOP.

Past Paper Notes:


Last Day in Class on IA Project Program - 13 Nov 2018

Today is the last day in class working on your IA Project program.
A working version (not finished, but working) is due :
 
Wed 21 Nov - Preliminary Working Version of IA Program due

This must be turned in as a .zip archive containing your ENTIRE program,
including any sample data files.

Starting tomorrow we will start reviewing for Mock Exams.

Continue IA Project - 5-8 Nov 2018

It's Monday - you might want to update your Record of Tasks.

Continue IA Project - 29-31 Oct 2018

Continue working on your Java program for the IA Project.

Be sure to write an entry in your Record of Tasks.
This should be a programming goal, like :
"saving data on the hard disk"
or
"laying out the user-interface"
Make a realistic plan for completing this, like 2 days or a week.

Continue IA Project - 26 Oct 2018

Continue working on your Java program for the IA Project.


Saving via Serialization - 25 Oct 2018

Download the newest version of the HotelManager program:

This contains saveData and loadData methods,
and the classes have been marked with "implements Serializable":
//========================
    public void saveData()
    {
        try
        {
            FileOutputStream file = new FileOutputStream("hotel.dat");
            ObjectOutputStream info = new ObjectOutputStream( file );
            info.writeObject( hotel.reservations );
            info.close();
            file.close();
        }
        catch(Exception ex)
        {  output(ex.toString()); }
    }   
    
    public void loadData() 
    {
        try
        {
            FileInputStream file = new FileInputStream("hotel.dat");
            ObjectInputStream info = new ObjectInputStream( file );
            hotel.reservations = (Reservation[])info.readObject();
            info.close();
            file.close();
        }
        catch(Exception ex)
        { output(ex.toString()); }
    }  

//==========================


Sorting - 23 Oct 2018


Download this program, then do the following:

- run it and test that it works correctly

- increase the amount of sample data to 20 items

- load the sample data an then add 2 new reservations and sort the result,
    checking the the sorting works correctly

- add another button that SORTS ROOMS - so it sorts all the reservations
   in order of the room numbers

- add another button that SORTS NAMES - so it sorts all the reservations
   in order of the customer name

- try pressing the 3 Sort buttons in various orders -
   that should produce a variety of results


Hotel Program - 19-22 Oct 2018

We will start writing the Hotel program (below).

We need to focus on the following goals:
 A hotel management system must fulfill at least the following goals:
- records reservations
- checks-in customers when they arrive
- assigns an empty room when a customer checks in
- checks-out customers when they leave
- prints a bill when a customer checks out
- SEARCHes for specific info, like "who is in room 12"
   or "what room is Ronald MacDonald in"
- SORTS data and displays it, for example:
   - all the names currently staying in the hotel
   - a list of empty rooms right now
   - a list of empty rooms on a future date.

We will concentrate on OOP concepts.


OOP - 16-19 Oct 2018

The Paper 2 exam will be about Object Oriented Programming.  We need to learn a bit more about vocabulary and details to prepare for the Mock Exam in December.





Example UML Class Diagram



HOTEL Example:

A hotel management system must fulfill at least the following goals:
- records reservations
- checks-in customers when they arrive
- assigns an empty room when a customer checks in
- checks-out customers when they leave
- prints a bill when a customer checks out
- SEARCHes for specific info, like "who is in room 12"
   or "what room is Ronald MacDonald in"
- SORTS data and displays it, for example:
   - all the names currently staying in the hotel
   - a list of empty rooms right now
   - a list of empty rooms on a future date

   Hotel hotel = new Hotel();
   
   private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {                                        
       String name = input("Customer name");
       int room = Integer.parseInt(input("Room number"));
       String start = input("Starting date");
       String end = input("Ending date");
       for(int x=0; x < 1000; x=x+1)
       {
           if(hotel.reservations[x] == null)
           {
               Reservation res = new Reservation();
               res.customer = name;
               res.room = room;
               res.arrive = start;
               res.depart = end;
               hotel.reservations[x] = res;
               return;
           }
       }
   }                                        

   private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {                                        
       for(int x = 0; x < 1000; x = x+1)
       {
           if(hotel.reservations[x] != null)
           {
               Reservation res = hotel.reservations[x];
               output(res.room + ":" + res.customer);
           }
       }
   }

 static String input(String prompt)
 { return javax.swing.JOptionPane.showInputDialog(null,prompt); }

  public void output(String message)
  {  javax.swing.JOptionPane.showMessageDialog(null,message);  }

//==================================================

public class Hotel {
   Reservation[] reservations = new Reservation[1000];
}

//===================================================

class Reservation
{
  String customer;
  int room;
  String arrive;
  String depart;
}

Continue Stage B - 15 Oct 2018

This is the last day in class to work on Stage B.
So if you have questions, ask them today.

Remember - it is due on Thur 18 Oct at 16:00


Turning in Stage B Draft - 9 Oct 2018

On 18 Oct, a DRAFT of Stage B - Design is due.

This should NOT include a TESTING plan.
It need not be "complete", but must demonstrate a thorough
start on all of the following parts:

(1) Record of Tasks - all task accomplished between May 
  and Sep (including an entry about completing Stage B Draft)

(2) ONE system OVERVIEW diagram, 
     which could be displayed as any of the following:
   - top-down hierarchical chart
   - UML class diagram
   - Data-Flow-Diagram showing how data flows between modules,
     including text files, arrays, screen displays, and other variables
     DFD Introduction --> 
https://www.smartdraw.com/data-flow-diagram/ 

     We will discuss these notes:
     
http://ibcomp.fis.edu/275979/ibcomp/review/DesignOOP2.pdf

(3) "screen-shots" from your Visual Prototype (or further
     additions) - at least 5 "screen-shots"

(4) algorithms that will implement interesting automation
     (at least 3 algorithms) - algorithms may be displayed as:
     - Pseudocode 
     - or  Flow-charts (example)    
     - Java (maybe from the Functional Prototype)
  In each case the algorithm must be clearly explained

The teacher will show examples of each of these.


A bit more about UML - 26 Sep 2018




Continue Stage B - 25 Sep 2018

1.  Make sure you have started your Record of Tasks document -
     that you have made the first 4 or 5 entries, including:
     - choosing a problem and a client
     - Visual Prototype
     - Client interview
     - Functional Prototype
     - Stage A

2. Outline a few Classes (objects) in UML


UML Diagrams - 24 Sep 2018

1.  Make sure you have started your Record of Tasks document -
     that you have made the first 4 or 5 entries, including:
     - choosing a problem and a client
     - Visual Prototype
     - Client interview
     - Functional Prototype
     - Stage A

2.  Here is a brief explanation of UML diagrams:

3.  Here is a Diagram Editor for Flowcharts and UML:
          http://www.draw.io 

4.  Here is a sample UML diagram for an attendance program:
       

UML = Unified Modeling Language

This provides diagrams that clearly illustrate the connections
between MODULES in a system.

If you use OBJECTS and CLASSES in your project,
you should include a UML chart, like this:


That shows the following:
- data members (variables/properties) of each object
- method members of each object
- BasicPart and CompoundPart both EXTEND (isA) Part
- CompoundPart must CONTAIN (hasA) 2 or more parts

Here is another simple example:



Here is one more example - you are unlikely to have so many classes:

Notice that this only has class boxes, without arrows.
This is sufficient for an IB IA Project.


Record of Tasks - 20 Sep 2018

For your Internal Assessment Project, you are required
to keep a journal of all your work.  
This is called the "Record of Tasks".
You will find this in the Documents folder in the following link;
http://xmltwo.ibo.org/publications/DP/Group4/d_4_comsc_tsm_1201_2/word/Forms.zip


Starting Stage B - 18 Sep 2018


Due Date :  Stage B partial (no testing) - 18 Oct at 18:00


Fire Drill Test Interruption - 18 Sep 2018

Please finish your test as homework.  It shouldn't take more than 30 min.
You may consult your book and notes, including online notes,
but do not discuss the test with other students.
It will be graded like an essay rather than a test -
so the teacher will comment on the quality of your writing.
This is homework - turn in your test on Wed 19 Sep.


More Network Questions - 14-17 Sep 2018

We will finish discussing these exam questions:

Then we will discuss the questions at the end of Chapter 15:


Network Exam Questions - 11-12 Sep 2018

IB Exam Questions about Networks


IB Syllabus - 10 Sep 2018

*** STAGE A GRADES ***
Several students neglected to submit the APPENDIX containing
notes of the Client Interview.  Those students need to add
this appendix and resubmit the Stage A document -
submit this no later than 17 Sep.  Any students who wish
to make other improvements may also resubmit the document
and possibly receive a better grade.

~~~~~~~~~~

We will discuss the official IB Syllabus notes:

How Data Moves Around - 31 Aug 2018

*** Remember that Stage A is due 31 Aug ***

Today: Follow data in the web

Questions about networks:


Networks - Section 3 in IB Syllabus - 21-28 Aug 2018

Reading :  Read Chapter 15 NETWORKING (p717) in your textbook Computer Science Illuminated
https://drive.google.com/uc?export=download&id=0B2t-Tmujl-IbTHlDbGl6MnZFTlU

A good overview in a Video:
https://www.youtube.com/watch?v=fCxfp1iUbqw

IB Notes :  Topic 3 - Network Basics  with brief explanations and questions
https://docs.google.com/document/d/1LdJ_b-1S3NNz5NXmw7WLeAkKza9NhWxqqrd6ItTRoro/edit

Some informative videos:
Basics of Protocols (first half)
Internet of Things :  Part 1 . Part 2  Part 3 .  Part 4 . Part 5 . (you need not watch ALL of these)
Google Data Center (start in the middle)

About DNS
Google: [which ip addresses are local]



== 27 Aug ==

Future Networks

Internet of Things :  Part 1 . Part 2  Part 3 .  Part 4 . Part 5 . (you need not watch ALL of these)

Internet of Things, 5G, better BlueTooth, Network Neutrality,  NFC = Near Field Communication = Contactless Credit Card readers

100 Questions and Answers


Continuing Stage A - Planning - 16-17 Aug 2018

It is time to write the first OFFICIAL part of the IA Project - Stage A.

  Stage A : due on Fri 31 Aug at 18:00

This is the easiest part of the IA Project. Don't turn it into something difficult.
It is 500 words - e.g. less than 2 pages.
The teacher will show you examples and outline what pieces are needed.


Read these notes:  
    http://ibcomp.fis.edu/275979/ibcomp/projects2014/SoftwareDesign.html

For Stage A, focus on :
- Choose a CLIENT and TALK TO THEM

- DEFINE the problem by :
  - referring to specific User Stories and Client Requests
  - show SAMPLE DATA and/or PICTURES of current solutions
  - include your VISUAL PROTOTYPE in the appendix if you wish

- EXPLAIN the REASONS for your proposed solution, especially
  - a picture of your VISUAL PROTOTYPE
  - AUTOMATION that will make things better for the client
  - REQUIREMENTS and/or LIMITATIONS (more on this in the goals)

- write GOALS (Criteria for Success) that are:

  - clear
  - precise
  - testable
  - complete
  - written as a BULLETED LIST

- Put notes from your CLIENT interview in the APPENDIX
- If you want, put USER STORIES in the APPENDIX

- keep the total word-count under 500 words
   only "extended writing" counts - that means paragraphs 
   bulleted lists don't count 
   diagrams don't count
   the appendix doesn't count

Here is a good example that would receive 6/6 marks for Stage A:
    https://ibpublishing.ibo.org/live-exist/rest/app/tsm.xql?doc=d_4_comsc_tsm_1201_2_e&part=4&chapter=15
Look at the Student Work - Planning
You can IMITATE this, but do NOT COPY IT exactly
For example, if you write reasons for choosing Java,
don't write the same reasons that the author wrote.

Here is another good example :
   Example 6  Stock Control System
    https://ibpublishing.ibo.org/live-exist/rest/app/tsm.xql?doc=d_4_comsc_tsm_1201_2_e&part=4&chapter=13

You may wish to look at the Assessment Criteria:
    https://ibpublishing.ibo.org/live-exist/rest/app/tsm.xql?doc=d_4_comsc_tsm_1201_2_e&part=4&chapter=5

This CHECKLIST might also be useful:
    http://xmltwo.ibo.org/publications/DP/Group4/d_4_comsc_tsm_1201_2/word/checklistStudents_en.doc