Showing posts with label Semester 1. Show all posts
Showing posts with label Semester 1. Show all posts

IT1406 - Java Arrays



  • Arrays are used to store multiple values in a single variable, instead of declaring separate variables for each value.
  • To declare an array, define the variable type with square brackets:

String[] cars;
We have now declared a variable that holds an array of strings. To insert values to it, we can use an array literal - place the values in a comma-separated list, inside curly braces:

String[] cars = {"Volvo", "BMW", "Ford", "Mazda"};
To create an array of integers, you could write:

int[] myNum = {10, 20, 30, 40}

IT1406 - Java Operators



  • Operators are used to perform operations on variables and values.
  • In the example below, we use the + operator to add together two values:
Example
int x = 100 + 50;
  • Although the + operator is often used to add together two values, like in the example above, it can also be used to add together a variable and a value, or a variable and another variable:
Example
int sum1 = 100 + 50;        // 150 (100 + 50)
int sum2 = sum1 + 250;      // 400 (150 + 250)
int sum3 = sum2 + sum2;     // 800 (400 + 400)

IT1406 - Java Type Casting


Type casting is when you assign a value of one primitive data type to another type.

In Java, there are two types of casting:

Widening Casting (automatically)

  • converting a smaller type to a larger type size

byte -> short -> char -> int -> long -> float -> double

IT1406 - Java Data Types

As explained in the previous chapter, a variable in Java must be a specified data type:

Example
int myNum = 5;               // Integer (whole number)
float myFloatNum = 5.99f;    // Floating point number
char myLetter = 'D';         // Character
boolean myBool = true;       // Boolean
String myText = "Hello";     // String

IT1406 - Java Variables


Variables are containers for storing data values.

In Java, there are different types of variables, for example:


  1. String - stores text, such as "Hello". String values are surrounded by double quotes
  2. int - stores integers (whole numbers), without decimals, such as 123 or -123
  3. float - stores floating point numbers, with decimals, such as 19.99 or -19.99
  4. char - stores single characters, such as 'a' or 'B'. Char values are surrounded by single quotes
  5. boolean - stores values with two states: true or false


IT1406 - Java Comments


  • Comments can be used to explain Java code, and to make it more readable. It can also be used to prevent execution when testing alternative code
  • Single-line comments start with two forward slashes (//).
  • Any text between // and the end of the line is ignored by Java (will not be executed).


This example uses a single-line comment before a line of code:

Example
// This is a comment
System.out.println("Hello World");

This example uses a single-line comment at the end of a line of code:

Example
System.out.println("Hello World"); // This is a comment

Java Multi-line Comments

  • Multi-line comments start with /* and ends with */.
  • Any text between /* and */ will be ignored by Java.
  • This example uses a multi-line comment (a comment block) to explain the code:


Example
/* The code below will print the words Hello World
to the screen, and it is amazing */
System.out.println("Hello World");

Single or multi-line comments
It is up to you which you want to use. Normally, we use // for short comments, and /* */ for longer.

IT1406 - Java Syntax


In the previous chapter, we created a Java file called MyClass.java, and we used the following code to print "Hello World" to the screen:

MyClass.java
public class MyClass {
  public static void main(String[] args) {
    System.out.println("Hello World");
  }
}

Example explained

Every line of code that runs in Java must be inside a class. In our example, we named the class MyClass. A class should always start with an uppercase first letter.

Note: Java is case-sensitive: "MyClass" and "myclass" has different meaning.

IT1406 - Java Quick start

In Java, every application begins with a class name, and that class must match the filename.

Let's create our first Java file, called MyClass.java, which can be done in any text editor (like Notepad).

The file should contain a "Hello World" message, which is written with the following code:

MyClass.java

public class MyClass {
  public static void main(String[] args) {
    System.out.println("Hello World");
  }
}

IT1105 - Introduction to information systems

What is Data?
  • Data are individual units of Informaiton
  • Data are distinct pieces of information
  • Examples are rainfall data , Temperature etc
What is Information?
  • Information is processed data 
  • This is having a meaning and can be used to make a desicion or understanding
  • Examples are Monthly report of Rainfall , Monthy sales report etc.
 How to convert Data to Information ?
  • By carring out some series of activities , we can convert data into information
  • These activities involves mathematical  operations or/ and tabulation operations etc.
IT1105
Why Knowledge is important in this process?

  • According to the above example , a definite procedure / guidance / rules are needed for the process of converting data into information.
  • Before selecting data for the process  , they could be examined to find out  thier relevance or validity. Such examination is a prefix of the process.
  • In order to improve the value of the information , the output of processed data will be organized with respect ot some relatioship to improve its value
What are the types of Inforamtion and data?
  • Image data >> Graphics , Images and Pictures
  • Audio data >> Sound , Noise or Tones
  • Video data >> Moving pictures or images
  • Alpha numeric Data >> Numbers , Letters, Characters
What are the Characteristics of valueble information?
  • The value of the information is depend on the usefulness in desicion making process.
  • This value can be judged based on a set of features that can be identified in information.
  • They are as follows
    • Accuracy - Accurate information is error free. Error can be caused due to various reasons. If there's some problem in knowledge required in process , the output may have error. At the same time if the data contains error , information also gets error. This is known as Garbage in Garbage Out (GIGO)
    • Complete -Complete information contains eveything needed for the decision making process. Example - Annual Report
    • Economical - Information should also be economical .Decision makers must always balance  the value of information with the cost of production. For example if the collecting data takes lots of time and resources , its not economical.
    • Flexible - Flexible information can be used for a variety of purposes. For example, Information on how much inventory is on hand for a particular part can be for 
      •  a sales representative to determine the sales plan
      • a production manager to identify possible constraints for the production
      • a financial executive to calculate the current assets figures of inventory  
    • Reliable- Reliability of information describes the correctness of the information. If there are any problems with respect to correctness of data, it will definitely affect thereliability of information. For example, if the reliability of data collection method ispoor, it will directly affect the information that will be produced.  For example, prediction of prices based on rumors (not past variance information),is not reliable.  
    • Relevant- The relevance of information is determined based on the usefulness of information with respect to the decision making process. For example, a drop in timber prices cannot be used to predict the price fluctuation in computers.  
    • Simple- Simplicity in the representation of information is also a very useful feature utilized to improve the usability of information in the decision making process. Too many information could affect the simplicity in the presentation. Therefore, it is better to provide interactive customization to determine simplicity. Providing too many information is known as information overloading.  
    • Timeliness- Decisions should be made at the right time to achieve effectiveness. Timely information refers to providing information at the right time. For example, if you canget to know today’s weather forecast before you leave home, you can decide whether to bring an umbrella or not.  
    • Verifiable- If it is possible to confirm the reliability of the information about its correctness (validate), it becomes verifiable Information. If you are not sure about a particular information (say foreign news) heard from a radio channel, you can search about it using the Internet.  
    • Accessible - Accurate information plays a major role in the decision making process of any organization. Therefore it is essential to be able to access the correct/ relevant information by authorized personnel at the right time to meet their needs.  
    • Secure -  the value of information could be lost due to issues such as unauthorized user access or intentionally damaging its existence. Therefore, it is important to make steps to protect valuable data and information. For example, use of passwords to protect data and information. 

Value of Information


  • The value of the information is calculated with respect to it's usage compared to it's 

Syllabus (IT1105 - Information System and Technology )

Following are the main topics discussed through out this subject

  1. Intorduction to information Systems
  2. Hardware and software computer based information systems ( CBIS)
  3. Organizing data and information
  4. Organization and information systems
  5. Business information systems
  6. System development
  7. Security, privacy and ethical issues

BIT - Outline

This is the course outline of BIT  (University of Colombo , School of Computing)

Course Duration - 3 Years
No Semesters  - 6

Details of Semesters

  1. Semester 1
      • Information system and technology
      • Computer Systems I
      • Web Application Development I
      • Communication skills
      • Introductory Mathematics
      • Personal Computing
  2. Semester 2
      • Mathematics for Computers I
      • Programming I
      • Database Systems I
      • System analyse and Designs
  3. Semester 3
      • Object oriented analysis and design
      • Fundamentals of Software engineering
      • Mathematics for Computing II
      • User Interface design
      • Web application Development II
  4. Semester 4
      • Programming II
      • Information technology project management
      • Rapid software developement
      • Computer Networks
  5. Semester 5
      • Professional issues in IT (Compulsary)
      • Information system security (Compulsary)
      • Fundamentals of Managment (Compulsary)
      • Software development Project (Compulsary)
      • Computer System II (Optional)
      • Fundamentals of Multimedia (Optional)
  6. Semester 6
      • System and network administration (Compulsary)
      • Introduction to entrepreneurship (Compulsary)
      • Database systems II (Compulsary)
      • Software Development projects (Compulsary)
      • e - Business Applications (Optional)
      • Middleware architecture (Optional)