IBDP Computer Science

Computer Science is a challenging but fulfilling course, that will allow learners to engage in the modern world through the learning of Programming and Computational Theory. Students will engage in a project that uses real world techniques and software engineering principles, and will discuss and debate the role of technology today, whether that be the impact of AI and machine learning, or the effect of commercialization of technology on the environment and the people using it. Students of Science, Mathematics, Statistics, Engineering and Finance both use and rely on technology, so a strong understanding will be beneficial for students of many different career paths.

Paper - 1 (HL/SL)

Paper - 2 (HL/SL)

Paper - 3 (HL only)

Internal Assessment 2023

Internal Assessment Criteria

Practical application of skills through the development of a product and associated documentation. The solution is assessed using five criteria:

  1. Criterion A: Planning (6 marks)
  2. Criterion B: Solution overview (6 marks)
  3. Criterion C: Development (12 marks)
  4. Criterion D: Functionality and extensibility of product (4 marks)
  5. Criterion E: Evaluation (6 marks)
Appropriate Choice of Topics for Your IA

Students can select any topic that interests them. It does not have to be directly related to the specified themes in the syllabus or to the option studied. Students should undertake a challenging task using appropriate techniques to showcase their algorithmic thinking and organizational skills.

The solution may take one of these forms:

  • Creating a new system, such as an OOP program, a relational database, a simulation or a stand-alone/Web-based application
  • Adding functionality to an existing system, such as connecting a webpage(s) to a database, writing a function for Moodle, writing a plug-in, or developing a stand-alone application.

It is essential that whatever form the solution takes it ensures the student can explicitly demonstrate and document his or her algorithmic thinking skills.

Inadequate Product Examples

It should be noted that products created using templates that show no evidence of modification in their structure, design or functionality are not permitted. Examples of inappropriate products include:

  • the development of a programming product only using copied code
  • the development of a website (product) using a web-based template that determines its structure and layout
  • the use of unmodified exemplar products or templates provided with software such as the Northwind database in MS Access
  • a product that does not meet the ethical requirements outlined in the “Ethics” section of the page.

Java Programming

import java.io.*;
class activities
{
    public static void main(String args[])throws IOException
    {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        int size = 5;
        int club1=0,club2=0,club3=0,club4=0;
        String name[] = new String[size];
        String choices[] = new String[size];
        String club[] = {"Debate Club","IT Club","Paper Modelling","Robotics"};
        for(int i=0;i<size;i=i+1)
        {
            System.out.print("enter the name of student "+(i+1));
            name[i] = br.readLine();
            System.out.println("----Selct the Club----");
            for(int j=0;j<club.length;j++)
            {
                System.out.println((j+1)+": "+club[j]);
            }
            System.out.println("enter your choice for the club");
            int choice = Integer.parseInt(br.readLine());
            if(choice==1)
            {
                System.out.println("You have selected "+club[0]); 
                choices[i] = club[0];
                club1++;
            }
            else if(choice==2)
            {
                System.out.println("You have selected "+club[1]);
                choices[i] = club[1];
                club2++;
            }
            else if(choice==3)
            {
                System.out.println("You have selected "+club[2]);
                choices[i] = club[2];
                club3++;
            }
            else if(choice==4)
            {
                System.out.println("You have selected "+club[3]);
                choices[i] = club[3];
                club4++;
            }
            else
            {
                System.out.println("Wrong choice");
                choices[i] = "No Selection";
            }
        }
        for(int j=0;j<choices.length;j++)
        {
            System.out.println((j+1)+": "+name[j]+" -> "+choices[j]);
        }
        System.out.println("Students in "+club[0]+" : "+club1);
        System.out.println("Students in "+club[1]+" : "+club2);
        System.out.println("Students in "+club[2]+" : "+club3);
        System.out.println("Students in "+club[3]+" : "+club4);
    }
}

 

// Online Java Compiler
// Use this editor to write, compile and run your Java code online
class concat2Arrays 
{
    public static void main(String[] args)
    {
        int arr1[] = {1,2,3,4,5};
        int arr2[] = {6,7,8,9};
        int arr1L = arr1.length;
        int arr2L =arr2.length;
        int arr3L = arr1L + arr2L;
        int[] arr3 =new int[arr3L];
        for (int i = 0; i < arr1L; i = i + 1) 
        {
            arr3[i] = arr1[i];
        }
        for (int i = 0; i < arr2L; i = i + 1) 
        {
            arr3[arr1L + i] = arr2[i];
        }
        for (int i = 0; i < arr3L; i =i + 1) 
        {
            System.out.print(arr3[i]);
        }
    }
}

 

public class Largest 
{ public static void main(String[] args)
{ double[] numArray = { 23.4, -34.5, 50.0, 33.5, 55.5, 43.7, 5.7, -66.5 }; double largest = numArray[0]; for (double num: numArray)
{ if(largest < num) largest = num; } System.out.format("Largest element = ", largest); } }

 

public class AddMatrices {
    public static void main(String[] args) {
        int rows = 2, columns = 3;
        int[][] firstMatrix = { {2, 3, 4}, {5, 2, 3} };
        int[][] secondMatrix = { {-4, 5, 3}, {5, 6, 3} };
        // Adding Two matrices
        int[][] sum = new int[rows][columns];
        for(int i = 0; i < rows; i++) {
            for (int j = 0; j < columns; j++) {
                sum[i][j] = firstMatrix[i][j] + secondMatrix[i][j];
            }
        }
        // Displaying the result
        System.out.println("Sum of two matrices is: ");
        for(int[] row : sum) {
            for (int column : row) {
                System.out.print(column + "    ");
            }
            System.out.println();
        }
    }
}

 

//Java Program to demonstrate the working of a banking-system  
//where we deposit and withdraw amount from our account.  
//Creating an Account class which has deposit() and withdraw() methods  

class Account
{
 int acc_no;
 String name;
 float amount;
 void insert(int a,String n,float amt)
 {
 acc_no=a;
 name=n;
 amount=amt;
 }
 void deposit(float amt)
 {
 amount=amount+amt;
 System.out.println(amt+" deposited");
 }
 void withdraw(float amt)
 {
 if(amount<amt)
 {
  System.out.println("Insufficient Balance");
 }
 else
 {
  amount=amount-amt;
  System.out.println(amt+" withdrawn");
 }
}
 void checkBalance()
 {
  System.out.println("Balance is: "+amount);
 }
 void display()
 {
 System.out.println(acc_no+" "+name+" "+amount);
 }
}
class TestAccount
{
public static void main(String[] args)
 {
 Account a1=new Account();
 a1.insert(832345,"James",1000);
 a1.display();
 a1.checkBalance();
 a1.deposit(40000);
 a1.checkBalance();
 a1.withdraw(15000);
 a1.checkBalance();
 }
} 

 

public class aboveMajorDiagonal
{
public static void main(String[] args)
{
int [][]arr = {{1,2,3},{4,5,6},{7,8,9}};
for(int row = 0; row < arr.length; row++)
{
for(int col = 0; col < arr[0].length; col++)
{
if(row<=col)
System.out.print(arr

+" ");
else
System.out.print(" ");
}
System.out.println();
}
}
}

 

public class EvenPosition 
{  
    public static void main(String[] args) 
    {  
        int [] arr = new int [] {1, 2, 3, 4, 5};  
        System.out.println("Elements of given array present on even position: ");  
        for (int i = 1; i < arr.length; i = i+2) 
        {  
            System.out.println(arr[i]);  
        }  
    }  
}

 

import java.io.*;
import java.util.Random;
class sortsearch
{
    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    void display_array(int arr[])
    {
        int n = arr.length;
        System.out.println("Array: ");
        System.out.print("[");
        for(int i=0;i<n-1;i++)
        {
            System.out.print(arr[i]+", ");
        }
        for(int i=n-1;i<n;i++)
        {
            System.out.print(arr[i]);
        }
        System.out.println("]");
    }
    void bubblesort(int arr[])
    {
        int n = arr.length;
        for(int i=0;i<n-1;i++)
        {
            for(int j=0;j<n-i-1;j++)
            {
                if(arr[j]>arr[j + 1])
                {
                    int temp = arr[j];
                    arr[j] = arr[j + 1];
                    arr[j + 1] = temp;
                }
            }
        }
    }
    void linear_search(int arr[])throws IOException
    {
        System.out.println("Enter the element you want to find");
        int target = Integer.parseInt(br.readLine());
        boolean found = false;
        for(int i=0;i<arr.length;i++)
        {
            if(arr[i]==target)
            {
                System.out.println("Element found at position "+i);
                found = true;
                break;
            }
        }
        if(!found)
        {
            System.out.println("Element not found");
        }
    }
    void binary_search(int arr[])throws IOException
    {
        System.out.println("Enter the element you want to find");
        int target = Integer.parseInt(br.readLine());
        int lb = 0;
        int ub = arr.length-1;
        int mid = (lb+ub)/2;
        while(lb<=ub)
        {
            if(target == arr[mid])
            {
                System.out.println("Element found at position "+mid);
                break;
            }
            else if(target < arr[mid])
            {
                ub = mid-1;
            }
            else if(target > arr[mid])
            {
                lb = mid+1;
            }
            mid = (lb+ub)/2;
        }
        if (lb > ub) {
            System.out.println("Element not found");
        }
    }
    void selectionsort(int arr[])
    {
        for (int i=0;i<arr.length-1;i++)  
        {  
            int index = i;  
            for (int j=i+1;j<arr.length;j++)
            {  
                if (arr[j] < arr[index])
                {  
                    index = j;
                }  
            }  
            int smallerNumber = arr[index];  
            arr[index] = arr[i];  
            arr[i] = smallerNumber;  
        }
    }
    public static void main(String args[])throws IOException
    {
        sortsearch ob = new sortsearch();
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        System.out.println("Input Integer Array");
        System.out.println("Enter function:");
        System.out.println("[1] User Input");
        System.out.println("[2] Random Generated");
        int input = Integer.parseInt(br.readLine());
        System.out.println("Enter size of your array");
        int n = Integer.parseInt(br.readLine());
        int arr[] = new int[n];
        switch(input)
        {
            case 1:
                {
                    for(int i=0;i<n;i++)
                    {
                        System.out.println("Enter element at position "+i);
                        arr[i] = Integer.parseInt(br.readLine());
                    }
                }
                break;
            case 2:
                {
                    for(int i=0;i<n;i++)
                    {
                        Random rnd = new Random();
                        int randomInt = (int) ('1' + rnd.nextInt(99));
                        arr[i] = randomInt;
                    }
                }
                break;
        }
        int choice = 9;
        while(choice!=0)
        {
            System.out.println("Enter function:");
            System.out.println("[1] Display Array");
            System.out.println("[2] Bubble Sort");
            System.out.println("[3] Selection Sort");
            System.out.println("[4] Linear Search");
            System.out.println("[5] Binary Search");
            System.out.println("[0] Exit");
            choice = Integer.parseInt(br.readLine());
            switch(choice)
            {
                case 1:
                    {
                        ob.display_array(arr);
                    }
                    break;
                case 2:
                    {
                        ob.bubblesort(arr);
                    }
                    break;
                case 3:
                    {
                        ob.selectionsort(arr);
                    }
                    break;
                case 4:
                    {
                        ob.linear_search(arr);
                    }
                    break;
                case 5:
                    {
                        ob.binary_search(arr);
                    }
                    break;  
                case 0:
                    {
                        break;
                    }
                default:
                    {
                        System.out.println("Input Error");
                    }
            }
        }
        System.out.println("Exited Successfully");
    }
}