CS 0007 Lecture Notes - Lecture 1: Instruction Set, Java Virtual Machine

24 views1 pages
6 Oct 2017
What is a program?
a program is a collection of instructions that perform a specific task when executed by a
when talking about a computer, we’re talking about a combination of hardware and
software working together
disc drive is secondary storage and is permanent (meaning when you turn off your
computer, the data will still be there)
Software comes in two flavors: operating system (ex: Mac OS, Linux, Apple’s IOS) and
application (Microsoft, iTunes)
software is written in a high level programming language that is converted into
machine language using a compiler
This means we will write in a language we understand, then compile (or
convert) it into a language a computer can understand
Fundamentals of programming language
Key words: things the language treats as special (ex: import, public, static, “")
Operators: these are basically variables that give the computer orders (ex: =)
Syntax: rules of language that must be followed or else the program will not compile
Punctuation: grammatical rules
Programmer defined names: labels given by user that identify an immediate result or are
Java Virtual Machine
When Java is compiled it is converted into Java byte code
an instruction set that can be read and executed by a Java Virtual Machine
(JVM), which is a program that can read Java byte code regardless of the
computers operating machine and hardware
this is NOT common among programing codes like C++
Advice for writing a program:
A Good Approach:
1.Understand the task of the program
2.Identify the sequence of actions that must occur
3.Break the sequence into a series of small steps that can be individually coded,
tested and verified. Start with the first step.
4.Write code and identify the error/edge cases for the step.
5.Compile, fix compile errors and warnings.
6.Test. Fix logic until tests pass.
7.Make a backup (next slide).
8.If not complete, pick the next step and go to 4. If complete, zip and submit.
find more resources at oneclass.com
find more resources at oneclass.com
Unlock document

This preview shows half of the first page of the document.
Unlock all 1 pages and 3 million more documents.

Already have an account? Log in

Get access

Grade+20% OFF
$8 USD/m$10 USD/m
Billed $96 USD annually
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
$8 USD/m
Billed $96 USD annually
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers