java chapter 1 problem solving: 1. understanding the problem. 2. breaking the problem into...
TRANSCRIPT
![Page 1: Java Chapter 1 Problem solving: 1. Understanding the problem. 2. Breaking the problem into manageable pieces. 3. Designing a solution. 4. Considering alternatives](https://reader036.vdocuments.net/reader036/viewer/2022071807/56649eb45503460f94bbbfdb/html5/thumbnails/1.jpg)
Java Chapter 1Problem solving:
1. Understanding the problem.
2. Breaking the problem into manageable pieces.
3. Designing a solution.
4. Considering alternatives to the solution and refining the solution.
5. Implementing the solution
6. Testing the solution and fixing any problems.
![Page 2: Java Chapter 1 Problem solving: 1. Understanding the problem. 2. Breaking the problem into manageable pieces. 3. Designing a solution. 4. Considering alternatives](https://reader036.vdocuments.net/reader036/viewer/2022071807/56649eb45503460f94bbbfdb/html5/thumbnails/2.jpg)
Memory:Each memory location is eight
bits or a byte of information.1 kilobyte = 1024 bytes.
2^101 megabyte = 2^20 bytes.1 gigabyte = 2^30 bytes.
Binary (base 2): 1 or 0 in a bit.Conversion to base 101101 = 1x2^3 + 1x2^2 +
0x2^1 + 1x2^0 = 13
![Page 3: Java Chapter 1 Problem solving: 1. Understanding the problem. 2. Breaking the problem into manageable pieces. 3. Designing a solution. 4. Considering alternatives](https://reader036.vdocuments.net/reader036/viewer/2022071807/56649eb45503460f94bbbfdb/html5/thumbnails/3.jpg)
Comments: Statements ignored by the computer.
// This begins a single line comment.
/* This begins a multiline comment.
*/ This will end the comment.
White space in java is ignored.
![Page 4: Java Chapter 1 Problem solving: 1. Understanding the problem. 2. Breaking the problem into manageable pieces. 3. Designing a solution. 4. Considering alternatives](https://reader036.vdocuments.net/reader036/viewer/2022071807/56649eb45503460f94bbbfdb/html5/thumbnails/4.jpg)
Java compiler and interpreter are part of the Java JDK (Java Development Kit) – download from Oracle
Syntax: rules of a language. These rules must be followed.
Semantics: What will happen when the statement is executed.
![Page 5: Java Chapter 1 Problem solving: 1. Understanding the problem. 2. Breaking the problem into manageable pieces. 3. Designing a solution. 4. Considering alternatives](https://reader036.vdocuments.net/reader036/viewer/2022071807/56649eb45503460f94bbbfdb/html5/thumbnails/5.jpg)
Errors:
compile-time error: syntax errors, incompatible types…
runtime error: causes the program to terminate abnormally (crash!).
logical error: bad results when executed.