Gregory M. Kapfhammer
Key Concept
Corresponding Diagram
In-Class Discussion
In-Class Activity
Details in the Textbook
Central processing unit (CPU)
Input/output devices (I/O)
Main memory (MM)
Secondary memory devices (SMD)
Operating systems
Applications and apps
Graphical user interface
Command-line interface
We love to use decimal ...
... but computers really don't! Why?
Bits and bytes
Unique numbers in 2-bit binary?
What about 3-bit binary?
Main memory is a grid of addresses
1 byte = 8 bits
1 word = 32 bits = 4 bytes
Kilobytes, megabytes, and gigabytes!
Volatile versus non-volatile
The memory hierarchy
Fast/slow, big/small, costly/cheap, close/far
Similarities and differences?
Concrete examples?
Please see the textbook for additional discussion
CPU components and main memory (Fig. 1.13)
Fetch-decode-execute cycle
Complexity and computation
High-level versus low-level
What level will we program at?
Network address
Try this command: ifconfig -a
Local-area and wide-area networks
Uniform resource locators
Network file system
Try this command: mount
public class Lincoln
{
// prints a presidential quotation
public static void main (String[] args)
{
System.out.println ("A quote by Abraham Lincoln:");
System.out.println ("Whatever you are, be a good one.");
}
}
Can you find? ... The definition of a class
public class Lincoln
{
// prints a presidential quotation
public static void main (String[] args)
{
System.out.println ("A quote by Abraham Lincoln:");
System.out.println ("Whatever you are, be a good one.");
}
}
Can you find? ... Java keywords
public class Lincoln
{
// prints a presidential quotation
public static void main (String[] args)
{
System.out.println ("A quote by Abraham Lincoln:");
System.out.println ("Whatever you are, be a good one.");
}
}
Can you find? ... A method invocation
public class Lincoln
{
// prints a presidential quotation
public static void main (String[] args)
{
System.out.println ("A quote by Abraham Lincoln:");
System.out.println ("Whatever you are, be a good one.");
}
}
Can you find? ... A character string
public class Lincoln
{
// prints a presidential quotation
public static void main (String[] args)
{
System.out.println ("A quote by Abraham Lincoln:");
System.out.println ("Whatever you are, be a good one.");
}
}
Can you find? ... A single line comment
public class Lincoln
{
// prints a presidential quotation
public static void main (String[] args)
{
System.out.println ("A quote by Abraham Lincoln:");
System.out.println ("Whatever you are, be a good one.");
}
}
Can you find? ... A declared variable
public class Lincoln2{public static void main(String[]args){
System.out.println("A quote by Abraham Lincoln:");
System.out.println("Whatever you are, be a good one.");}}
What is wrong with this program?
public class
Lincoln3
{
public
static
void
main
(
String
[]
args )
{
System.out.println (
"A quote by Abraham Lincoln:" )
; }
}
What is wrong with this program?
Levels of programming languages
Editing and running a Java program (Figure 1.20)
Compiling and running a Java program (Figure 1.21)
Using a modal text editor like GVim
Syntax and semantics of programming languages
The object is a fundamental entity in Java
Objects represent real-world entities
Let's review the basic terms on page 46!
Object, attribute, method, class
We will discuss these terms throughout the semester