Download presentation
Presentation is loading. Please wait.
Published byHubert Wilkinson Modified over 9 years ago
1
1
2
2 Its all about the science/study to problem solving using computational devices How efficient is the solution? Programming is an artifact which is part of the process a technique
3
3 You can say … Computer Science is just as much about programming as Astronomy is about building telescopes Astronomy is much more than just building telescopes It’s a science of studying celestial bodies Telescopes are just a mechanism to study the science
4
4 The computer actually only understands 0’s and 1’s Binary is a number system that has just 0 and 1. Its base is 2 numbers So how can we take these commands like move or turn left and turn them into 0’s and 1’s?
5
5 Machine language is what the computer understands What the microprocessor understands Machine language is defined by which microprocessor you have inside your computer
6
6 People are really bad when it comes to writing 1’s and 0’s So we program in what is known as a High Level Language There are all kinds of HLL’s One of the high level languages you’re going to learn in this class is Java
7
7 C C++ Basic Fortran
8
8 We program in a high level language because its level is higher than that of machine language There is a translation process High Level -> Low Level (Machine Level)
9
9 To go from a high level to low level is called “Compilation” This is achieved by a compiler Eclipse that you have been using along is a compiler It converts the high level language into something that the machine can understand
10
10 You write source code e.g. When you were writing Karel programs Machine understands object code
11
11
12
12 Some intermediary language also known as Java Byte code
13
13 Well guess what? In the world there are Macs, PC’s, Linux and all kinds of machines And the 1’s and 0’s that a Mac speaks are different to the 1’s and 0’s that a PC speaks and different to the 1’s and 0’s that the Linux speaks
14
14 It is important to install JRE (Java Runtime Environment) The class file can be run on any computer using the JRE on any machine
15
15 The idea is a program is written in a bunch of classes Lets refer to Karel public class KarelProgram extends Karel Java program is a set of classes
16
16 A class is just an encapsulation of some behavior that the program does and data Like Karel’s programs use some movement so that is behavior and then you have some data
17
17 Remember you wrote a class which extends Karel and gives you the basic functionality of Karel And then we extended SuperKarel which gave us even more functions like turnRight KarelSuperKarel Subclass
18
18 Karel Super Karel Super Class Sub Class
19
19 Example of classes Animals Monkeys Digest food Blastula stage Warm Blooded Have memory glands Five fingers Highly developed brains
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.