Computer Science A, 1

Download Report

Transcript Computer Science A, 1

Computer Science A 1
Course plan
• Introduction to programming
• Basic concepts of typical programming
languages.
• Tools: compiler, editor, integrated editor,
libraries.
• A bit about software engineering –
methods used in constructing programs.
• A bit about graphics
Computer Science A
• What you have to do
• 3 * home work
• 2 * mini-project
• 1 * oral test based on mini-project
Java programs
public class Hello{
public static void main(String args[]){
System.out.println(”Hello world”);
}
}
A program contains classes (here Hello)
classes contains methods (here main)
methods contains statements (here System.out…)
One class has the same name as the file (Hello.java)
One method in that class is called main
Java statements
Print out
System.out.println(….
Reading input
…
Declare variables
int counter;
Change values of variables
counter = 1;
Method calls
if statements
while statements