Programming Concept Chapter I Introduction to Java Programming.
-
Upload
lenard-miles -
Category
Documents
-
view
231 -
download
5
Transcript of Programming Concept Chapter I Introduction to Java Programming.
![Page 1: Programming Concept Chapter I Introduction to Java Programming.](https://reader038.fdocuments.in/reader038/viewer/2022103100/56649ec75503460f94bd2dd3/html5/thumbnails/1.jpg)
Programming Concept
Chapter I
Introduction to Java Programming
![Page 2: Programming Concept Chapter I Introduction to Java Programming.](https://reader038.fdocuments.in/reader038/viewer/2022103100/56649ec75503460f94bd2dd3/html5/thumbnails/2.jpg)
By the end of this lecture you should be able to:explain how the module is structured;prepare adequately for lectures, tutorials and
practicals;explain how the module is assessed;explain the meaning of the word software;explain how Java programs are compiled and
run;use an integrated development environment
(IDE) to write, compile and run programs.
![Page 4: Programming Concept Chapter I Introduction to Java Programming.](https://reader038.fdocuments.in/reader038/viewer/2022103100/56649ec75503460f94bd2dd3/html5/thumbnails/4.jpg)
MODULE FORMAT
![Page 5: Programming Concept Chapter I Introduction to Java Programming.](https://reader038.fdocuments.in/reader038/viewer/2022103100/56649ec75503460f94bd2dd3/html5/thumbnails/5.jpg)
2.5 HOUR LECTURE
1 HOUR TUTORIAL
1.5 HOURS COMPUTER LAB
![Page 6: Programming Concept Chapter I Introduction to Java Programming.](https://reader038.fdocuments.in/reader038/viewer/2022103100/56649ec75503460f94bd2dd3/html5/thumbnails/6.jpg)
Preparing for your
lectures, tutorials and practicals
![Page 7: Programming Concept Chapter I Introduction to Java Programming.](https://reader038.fdocuments.in/reader038/viewer/2022103100/56649ec75503460f94bd2dd3/html5/thumbnails/7.jpg)
ASSESSMENT
![Page 8: Programming Concept Chapter I Introduction to Java Programming.](https://reader038.fdocuments.in/reader038/viewer/2022103100/56649ec75503460f94bd2dd3/html5/thumbnails/8.jpg)
Assignment (Coursework)-week 12
Portfolio 1-Week 4
Portfolio 2-Week 7
Portfolio 3-Week 10
![Page 9: Programming Concept Chapter I Introduction to Java Programming.](https://reader038.fdocuments.in/reader038/viewer/2022103100/56649ec75503460f94bd2dd3/html5/thumbnails/9.jpg)
public class Game{ Car f1; f1.spin();}
The set of instructions that tells a computer what to do is called a program
![Page 10: Programming Concept Chapter I Introduction to Java Programming.](https://reader038.fdocuments.in/reader038/viewer/2022103100/56649ec75503460f94bd2dd3/html5/thumbnails/10.jpg)
public class Game{ Car f1; f1.spin();}
Software is the name given to a single program or a set of programs.
![Page 11: Programming Concept Chapter I Introduction to Java Programming.](https://reader038.fdocuments.in/reader038/viewer/2022103100/56649ec75503460f94bd2dd3/html5/thumbnails/11.jpg)
Application software is the name given to useful programs that a user might need.
![Page 12: Programming Concept Chapter I Introduction to Java Programming.](https://reader038.fdocuments.in/reader038/viewer/2022103100/56649ec75503460f94bd2dd3/html5/thumbnails/12.jpg)
System software is the name given to special programs that help the computer to do its job.
![Page 13: Programming Concept Chapter I Introduction to Java Programming.](https://reader038.fdocuments.in/reader038/viewer/2022103100/56649ec75503460f94bd2dd3/html5/thumbnails/13.jpg)
public class Game{ Car f1; f1.spin();}
Programming is the task of writing instructions for the computer
![Page 14: Programming Concept Chapter I Introduction to Java Programming.](https://reader038.fdocuments.in/reader038/viewer/2022103100/56649ec75503460f94bd2dd3/html5/thumbnails/14.jpg)
public class Game{ Car f1; f1.spin();}
These instructions have to be written in a special programming language.
![Page 15: Programming Concept Chapter I Introduction to Java Programming.](https://reader038.fdocuments.in/reader038/viewer/2022103100/56649ec75503460f94bd2dd3/html5/thumbnails/15.jpg)
public class Game{ Car f1; f1.spin();}
Examples include: C++, Visual Basic, Pascal, Java. Examples include: C++, Visual Basic, Pascal, Java.
![Page 16: Programming Concept Chapter I Introduction to Java Programming.](https://reader038.fdocuments.in/reader038/viewer/2022103100/56649ec75503460f94bd2dd3/html5/thumbnails/16.jpg)
public class Game{ Car f1; f1.spin();}
Examples include: C++, Visual Basic, Pascal, Java.
![Page 17: Programming Concept Chapter I Introduction to Java Programming.](https://reader038.fdocuments.in/reader038/viewer/2022103100/56649ec75503460f94bd2dd3/html5/thumbnails/17.jpg)
Compiling Programs
![Page 18: Programming Concept Chapter I Introduction to Java Programming.](https://reader038.fdocuments.in/reader038/viewer/2022103100/56649ec75503460f94bd2dd3/html5/thumbnails/18.jpg)
COMPILERif (words > MAX){ System.out.print();}
program (source) code
00111110 11010010 11110010 01010110
machine code
Programmer
Program user
![Page 19: Programming Concept Chapter I Introduction to Java Programming.](https://reader038.fdocuments.in/reader038/viewer/2022103100/56649ec75503460f94bd2dd3/html5/thumbnails/19.jpg)
Java Programming
![Page 20: Programming Concept Chapter I Introduction to Java Programming.](https://reader038.fdocuments.in/reader038/viewer/2022103100/56649ec75503460f94bd2dd3/html5/thumbnails/20.jpg)
JAVA COMPILERif (words > MAX){System.out.print();}
program code
JVM
Java byte code
11110011000011010101011110000101
Java Programmer
00111110 11010010 11110010 01010110
10011001000111110101011111100000
01100011111110001010110010001001
![Page 21: Programming Concept Chapter I Introduction to Java Programming.](https://reader038.fdocuments.in/reader038/viewer/2022103100/56649ec75503460f94bd2dd3/html5/thumbnails/21.jpg)
Java Applications
![Page 22: Programming Concept Chapter I Introduction to Java Programming.](https://reader038.fdocuments.in/reader038/viewer/2022103100/56649ec75503460f94bd2dd3/html5/thumbnails/22.jpg)
A console application
![Page 23: Programming Concept Chapter I Introduction to Java Programming.](https://reader038.fdocuments.in/reader038/viewer/2022103100/56649ec75503460f94bd2dd3/html5/thumbnails/23.jpg)
A graphical application
![Page 24: Programming Concept Chapter I Introduction to Java Programming.](https://reader038.fdocuments.in/reader038/viewer/2022103100/56649ec75503460f94bd2dd3/html5/thumbnails/24.jpg)
A Java Applet running in a browser
![Page 25: Programming Concept Chapter I Introduction to Java Programming.](https://reader038.fdocuments.in/reader038/viewer/2022103100/56649ec75503460f94bd2dd3/html5/thumbnails/25.jpg)
A Java application running on a mobile phone
![Page 26: Programming Concept Chapter I Introduction to Java Programming.](https://reader038.fdocuments.in/reader038/viewer/2022103100/56649ec75503460f94bd2dd3/html5/thumbnails/26.jpg)
A Java application running on a smart phone
![Page 27: Programming Concept Chapter I Introduction to Java Programming.](https://reader038.fdocuments.in/reader038/viewer/2022103100/56649ec75503460f94bd2dd3/html5/thumbnails/27.jpg)
Your first program
![Page 28: Programming Concept Chapter I Introduction to Java Programming.](https://reader038.fdocuments.in/reader038/viewer/2022103100/56649ec75503460f94bd2dd3/html5/thumbnails/28.jpg)
public class Hello{ public static void main(String[ ] args) { System.out.println("Hello world"); }}
![Page 29: Programming Concept Chapter I Introduction to Java Programming.](https://reader038.fdocuments.in/reader038/viewer/2022103100/56649ec75503460f94bd2dd3/html5/thumbnails/29.jpg)
public class Hello{ public static void main(String[] args) { System.out.println("Hello world"); }}
Hello World
![Page 30: Programming Concept Chapter I Introduction to Java Programming.](https://reader038.fdocuments.in/reader038/viewer/2022103100/56649ec75503460f94bd2dd3/html5/thumbnails/30.jpg)
public class Hello{ public static void main(String[] args) { System.out.println("Hello world"); }}
Hello Worldpublic class Hello{
}
public static void main(String[ ] args) { }
System.out.println("Hello world");
![Page 31: Programming Concept Chapter I Introduction to Java Programming.](https://reader038.fdocuments.in/reader038/viewer/2022103100/56649ec75503460f94bd2dd3/html5/thumbnails/31.jpg)
Hello World
![Page 32: Programming Concept Chapter I Introduction to Java Programming.](https://reader038.fdocuments.in/reader038/viewer/2022103100/56649ec75503460f94bd2dd3/html5/thumbnails/32.jpg)
public class Hello{ public static void main(String[] args) { System.out.println("Hello world"); }}
Hello Worldpublic class Hello{
}
public Static void main(String[ ] args) {
System.out.println("Hello world");
![Page 33: Programming Concept Chapter I Introduction to Java Programming.](https://reader038.fdocuments.in/reader038/viewer/2022103100/56649ec75503460f94bd2dd3/html5/thumbnails/33.jpg)
public class Hello{ public static void main(String[] args) { System.out.println("Hello world"); }}
Hello Worldpublic class Hello{
}
public Static void main(String[ ] args) {
System.out.println("Hello world");
![Page 34: Programming Concept Chapter I Introduction to Java Programming.](https://reader038.fdocuments.in/reader038/viewer/2022103100/56649ec75503460f94bd2dd3/html5/thumbnails/34.jpg)
public class Hello{ public static void main(String[] args) { System.out.println("Hello world"); }}
Hello Worldpublic class Hello{
}
public Static void main(String[ ] args) {
System.out.println("Hello world");
![Page 35: Programming Concept Chapter I Introduction to Java Programming.](https://reader038.fdocuments.in/reader038/viewer/2022103100/56649ec75503460f94bd2dd3/html5/thumbnails/35.jpg)
public class Hello{ public static void main(String[] args) { System.out.println("Hello world"); }}
Hello Worldpublic class Hello{
}
public static void main(String[ ] args) {
System.out.println("Hello world");
![Page 36: Programming Concept Chapter I Introduction to Java Programming.](https://reader038.fdocuments.in/reader038/viewer/2022103100/56649ec75503460f94bd2dd3/html5/thumbnails/36.jpg)
public class Hello{ public static void main(String[] args) { System.out.println("Hello world"); }}
Hello Worldpublic class Hello{
}
public static void main(String[ ] args) {
System.out.println("Hello world");
![Page 37: Programming Concept Chapter I Introduction to Java Programming.](https://reader038.fdocuments.in/reader038/viewer/2022103100/56649ec75503460f94bd2dd3/html5/thumbnails/37.jpg)
public class Hello{ public static void main(String[] args) { System.out.println("Hello world"); }}
Hello Worldpublic class Hello{
}
public static void main(String[ ] args) { }
System.out.println("Hello world");
![Page 38: Programming Concept Chapter I Introduction to Java Programming.](https://reader038.fdocuments.in/reader038/viewer/2022103100/56649ec75503460f94bd2dd3/html5/thumbnails/38.jpg)
public class Hello{ public static void main(String[] args) { System.out.println("Hello world"); }}
Hello Worldpublic class Hello{
}
public static void main(String[ ] args) { }
System.out.println("Hello world");
![Page 39: Programming Concept Chapter I Introduction to Java Programming.](https://reader038.fdocuments.in/reader038/viewer/2022103100/56649ec75503460f94bd2dd3/html5/thumbnails/39.jpg)
Integrated development
environment (IDE)
![Page 40: Programming Concept Chapter I Introduction to Java Programming.](https://reader038.fdocuments.in/reader038/viewer/2022103100/56649ec75503460f94bd2dd3/html5/thumbnails/40.jpg)
![Page 41: Programming Concept Chapter I Introduction to Java Programming.](https://reader038.fdocuments.in/reader038/viewer/2022103100/56649ec75503460f94bd2dd3/html5/thumbnails/41.jpg)
Type your programs here
![Page 42: Programming Concept Chapter I Introduction to Java Programming.](https://reader038.fdocuments.in/reader038/viewer/2022103100/56649ec75503460f94bd2dd3/html5/thumbnails/42.jpg)
Use these icons to compile and run you program
![Page 43: Programming Concept Chapter I Introduction to Java Programming.](https://reader038.fdocuments.in/reader038/viewer/2022103100/56649ec75503460f94bd2dd3/html5/thumbnails/43.jpg)
Compiler errors reported here
![Page 44: Programming Concept Chapter I Introduction to Java Programming.](https://reader038.fdocuments.in/reader038/viewer/2022103100/56649ec75503460f94bd2dd3/html5/thumbnails/44.jpg)
Your files shown here
![Page 45: Programming Concept Chapter I Introduction to Java Programming.](https://reader038.fdocuments.in/reader038/viewer/2022103100/56649ec75503460f94bd2dd3/html5/thumbnails/45.jpg)
![Page 46: Programming Concept Chapter I Introduction to Java Programming.](https://reader038.fdocuments.in/reader038/viewer/2022103100/56649ec75503460f94bd2dd3/html5/thumbnails/46.jpg)
Compiling and Running Java from TextPad
46
TextPad Optional
![Page 47: Programming Concept Chapter I Introduction to Java Programming.](https://reader038.fdocuments.in/reader038/viewer/2022103100/56649ec75503460f94bd2dd3/html5/thumbnails/47.jpg)
Compiling and Running Java from JBuilder
47
JBuilder Optional
![Page 48: Programming Concept Chapter I Introduction to Java Programming.](https://reader038.fdocuments.in/reader038/viewer/2022103100/56649ec75503460f94bd2dd3/html5/thumbnails/48.jpg)
Compiling and Running Java from NetBeans
48
NetBeans Optional
![Page 49: Programming Concept Chapter I Introduction to Java Programming.](https://reader038.fdocuments.in/reader038/viewer/2022103100/56649ec75503460f94bd2dd3/html5/thumbnails/49.jpg)
A Programming Puzzle
![Page 50: Programming Concept Chapter I Introduction to Java Programming.](https://reader038.fdocuments.in/reader038/viewer/2022103100/56649ec75503460f94bd2dd3/html5/thumbnails/50.jpg)
![Page 51: Programming Concept Chapter I Introduction to Java Programming.](https://reader038.fdocuments.in/reader038/viewer/2022103100/56649ec75503460f94bd2dd3/html5/thumbnails/51.jpg)
CREATE data
![Page 52: Programming Concept Chapter I Introduction to Java Programming.](https://reader038.fdocuments.in/reader038/viewer/2022103100/56649ec75503460f94bd2dd3/html5/thumbnails/52.jpg)
CREATE data DISPLAY data
![Page 53: Programming Concept Chapter I Introduction to Java Programming.](https://reader038.fdocuments.in/reader038/viewer/2022103100/56649ec75503460f94bd2dd3/html5/thumbnails/53.jpg)
CREATE data
PUT value IN data
DISPLAY data
![Page 54: Programming Concept Chapter I Introduction to Java Programming.](https://reader038.fdocuments.in/reader038/viewer/2022103100/56649ec75503460f94bd2dd3/html5/thumbnails/54.jpg)
CREATE data
PUT value IN data
DISPLAY data
ADD value TO data
![Page 55: Programming Concept Chapter I Introduction to Java Programming.](https://reader038.fdocuments.in/reader038/viewer/2022103100/56649ec75503460f94bd2dd3/html5/thumbnails/55.jpg)
CREATE data
PUT value IN data
DISPLAY data
ADD value TO data
3 x 6 = ?
![Page 56: Programming Concept Chapter I Introduction to Java Programming.](https://reader038.fdocuments.in/reader038/viewer/2022103100/56649ec75503460f94bd2dd3/html5/thumbnails/56.jpg)
CREATE data
PUT value IN data
DISPLAY data
CREATE data
ADD value TO data
![Page 57: Programming Concept Chapter I Introduction to Java Programming.](https://reader038.fdocuments.in/reader038/viewer/2022103100/56649ec75503460f94bd2dd3/html5/thumbnails/57.jpg)
CREATE data
PUT value IN data
DISPLAY data
CREATE total
ADD value TO data
![Page 58: Programming Concept Chapter I Introduction to Java Programming.](https://reader038.fdocuments.in/reader038/viewer/2022103100/56649ec75503460f94bd2dd3/html5/thumbnails/58.jpg)
CREATE data
PUT value IN data
DISPLAY data
CREATE total
ADD value TO data
total
![Page 59: Programming Concept Chapter I Introduction to Java Programming.](https://reader038.fdocuments.in/reader038/viewer/2022103100/56649ec75503460f94bd2dd3/html5/thumbnails/59.jpg)
CREATE data
PUT value IN data
DISPLAY data
CREATE total
ADD value TO data
total
PUT value IN data
![Page 60: Programming Concept Chapter I Introduction to Java Programming.](https://reader038.fdocuments.in/reader038/viewer/2022103100/56649ec75503460f94bd2dd3/html5/thumbnails/60.jpg)
CREATE data
PUT value IN data
DISPLAY data
CREATE total
ADD value TO data
total
PUT 6 IN total
![Page 61: Programming Concept Chapter I Introduction to Java Programming.](https://reader038.fdocuments.in/reader038/viewer/2022103100/56649ec75503460f94bd2dd3/html5/thumbnails/61.jpg)
CREATE data
PUT value IN data
DISPLAY data
CREATE total
ADD value TO data
PUT 6 IN total
6total
![Page 62: Programming Concept Chapter I Introduction to Java Programming.](https://reader038.fdocuments.in/reader038/viewer/2022103100/56649ec75503460f94bd2dd3/html5/thumbnails/62.jpg)
CREATE data
PUT value IN data
DISPLAY data
CREATE total
ADD value TO data
PUT 6 IN total
6total
ADD value TO data
![Page 63: Programming Concept Chapter I Introduction to Java Programming.](https://reader038.fdocuments.in/reader038/viewer/2022103100/56649ec75503460f94bd2dd3/html5/thumbnails/63.jpg)
CREATE data
PUT value IN data
DISPLAY data
CREATE total
ADD value TO data
PUT 6 IN total
6total
ADD 6 TO total
![Page 64: Programming Concept Chapter I Introduction to Java Programming.](https://reader038.fdocuments.in/reader038/viewer/2022103100/56649ec75503460f94bd2dd3/html5/thumbnails/64.jpg)
CREATE data
PUT value IN data
DISPLAY data
CREATE total
ADD value TO data
PUT 6 IN total
12total
ADD 6 TO total
![Page 65: Programming Concept Chapter I Introduction to Java Programming.](https://reader038.fdocuments.in/reader038/viewer/2022103100/56649ec75503460f94bd2dd3/html5/thumbnails/65.jpg)
CREATE data
PUT value IN data
DISPLAY data
CREATE total
ADD value TO data
PUT 6 IN total
12total
ADD 6 TO total
ADD value TO data
![Page 66: Programming Concept Chapter I Introduction to Java Programming.](https://reader038.fdocuments.in/reader038/viewer/2022103100/56649ec75503460f94bd2dd3/html5/thumbnails/66.jpg)
CREATE data
PUT value IN data
DISPLAY data
CREATE total
ADD value TO data
PUT 6 IN total
12total
ADD 6 TO total
ADD 6 TO total
![Page 67: Programming Concept Chapter I Introduction to Java Programming.](https://reader038.fdocuments.in/reader038/viewer/2022103100/56649ec75503460f94bd2dd3/html5/thumbnails/67.jpg)
CREATE data
PUT value IN data
DISPLAY data
CREATE total
ADD value TO data
PUT 6 IN total
18total
ADD 6 TO total
ADD 6 TO total
![Page 68: Programming Concept Chapter I Introduction to Java Programming.](https://reader038.fdocuments.in/reader038/viewer/2022103100/56649ec75503460f94bd2dd3/html5/thumbnails/68.jpg)
CREATE data
PUT value IN data
DISPLAY data
CREATE total
ADD value TO data
PUT 6 IN total
18total
ADD 6 TO total
ADD 6 TO total
DISPLAY data
![Page 69: Programming Concept Chapter I Introduction to Java Programming.](https://reader038.fdocuments.in/reader038/viewer/2022103100/56649ec75503460f94bd2dd3/html5/thumbnails/69.jpg)
CREATE data
PUT value IN data
DISPLAY data
CREATE total
ADD value TO data
PUT 6 IN total
18total
ADD 6 TO total
ADD 6 TO total
DISPLAY total
![Page 70: Programming Concept Chapter I Introduction to Java Programming.](https://reader038.fdocuments.in/reader038/viewer/2022103100/56649ec75503460f94bd2dd3/html5/thumbnails/70.jpg)
CREATE data
PUT value IN data
DISPLAY data
CREATE total
ADD value TO data
PUT 6 IN total
18total
ADD 6 TO total
ADD 6 TO total
DISPLAY total
18
![Page 71: Programming Concept Chapter I Introduction to Java Programming.](https://reader038.fdocuments.in/reader038/viewer/2022103100/56649ec75503460f94bd2dd3/html5/thumbnails/71.jpg)
CREATE total
PUT 6 IN total
ADD 6 TO total
ADD 6 TO total
DISPLAY total
![Page 72: Programming Concept Chapter I Introduction to Java Programming.](https://reader038.fdocuments.in/reader038/viewer/2022103100/56649ec75503460f94bd2dd3/html5/thumbnails/72.jpg)
CREATE total
PUT 6 IN total
ADD 6 TO total
ADD 6 TO total
DISPLAY total
Create data
![Page 73: Programming Concept Chapter I Introduction to Java Programming.](https://reader038.fdocuments.in/reader038/viewer/2022103100/56649ec75503460f94bd2dd3/html5/thumbnails/73.jpg)
CREATE total
PUT 6 IN total
ADD 6 TO total
ADD 6 TO total
DISPLAY total
Input data
![Page 74: Programming Concept Chapter I Introduction to Java Programming.](https://reader038.fdocuments.in/reader038/viewer/2022103100/56649ec75503460f94bd2dd3/html5/thumbnails/74.jpg)
CREATE total
PUT 6 IN total
ADD 6 TO total
ADD 6 TO total
DISPLAY total
Process data
![Page 75: Programming Concept Chapter I Introduction to Java Programming.](https://reader038.fdocuments.in/reader038/viewer/2022103100/56649ec75503460f94bd2dd3/html5/thumbnails/75.jpg)
CREATE total
PUT 6 IN total
ADD 6 TO total
ADD 6 TO total
DISPLAY total
Output data
![Page 76: Programming Concept Chapter I Introduction to Java Programming.](https://reader038.fdocuments.in/reader038/viewer/2022103100/56649ec75503460f94bd2dd3/html5/thumbnails/76.jpg)
CREATE total
PUT 6 IN total
ADD 6 TO total
ADD 6 TO total
DISPLAY total
![Page 77: Programming Concept Chapter I Introduction to Java Programming.](https://reader038.fdocuments.in/reader038/viewer/2022103100/56649ec75503460f94bd2dd3/html5/thumbnails/77.jpg)