Muhammad Essop I

Muhammad Essop
I.T. Term Assignment

1) Program: A software that can run on a computer.
Low-level language: A programming language that provides little or no abstraction of programming concepts.
High-level language: A language designed to simplify programming.
Source code: Any collection of code containing comments or commands.
Machine code: A set of instructions executed by the CPU.
Compiler: A program that compiles code
Interpreter: Executes instructions in programming form

3) An applet is a program that is web based. Java applets are designed to protect the user from malicious applets.
4) Java runs bytecode which is available on any computer
5) Java is compiled by user and interpreted by computer.
6) A) Integrated development environment
B) Java Design Kit
7) NetBeans IDE and PyCharm
8) Algorithm: The way something is done
Flowchart: Presenting an algorithm on a diagram
Pseudocode: Explains what a computer program must do or execute.
10) i)
Enter value in Centigrade

Take the value * C*9/5+32

Print out Fahrenheit value

ii) begin
display “Enter a value”
enter C
The display value in Fahrenheit

12) Java comments are statements that do not affect the output but are rather there to help the user to understand the code. It is performed by typing “//” and what you want to say

13) a) A statement in java is a command that could include expressions and affect the output
b) System.out.println(“Hi there”);

15) Println will display the output on a new line whereas print will print it out on the same line.

21) We give it a value

22) Assigning a variable

23a) import javax.swing.*;
public class Question23a {

public static void main(String args) {
double c, f;

c=Integer.parseInt(JOptionPane.showInputDialog(“Enter the Centigrade value”));
f= c*9/5+32;
System.out.println(“The temperature in Fahrenheit is “+ f);

23b) import javax.swing.*;
public class Question32b {

public static void main(String args) {
double r, a, v;

r=Integer.parseInt(JOptionPane.showInputDialog(“Enter the radius of a circle”));
a= Math.pow(r, 2) * Math.PI;
v= (4/3)*Math.PI*Math.pow(r, 3);
System.out.println(“The area of the circle is “+ a);
System.out.println(“The volume of the sphere is “+ v);



27) i) a code that assigns different numbers with char values
ii) Taking a value of one data type and converting it into another data type
iii) These include “+, -, /, *”
iv) Increasing or decresing a number by a certain amount.
v) The coding version of BODMAS

a) int*36
b) 1
c) 8
d) 8,4

30) x + 3


34) an IF-Statement
35) import javax.swing.*;
public class Question35 {

public static void main(String args) {
int age;
age=Integer.parseInt(JOptionPane.showInputDialog(“Enter your age”));

if (age