Week1 Intro To Java
Week1 Intro To Java
Fundamentals of
Computer Programming
CLASS RULES
ACADEMIC INTEGRITY
Students are expected to adhere to academic standards of honesty and integrity
and to avoid plagiarism, cheating, and other forms of academic misconduct.
Please be aware that a first offense for plagiarism or cheating will result in a
heavy suspension of one week, and a second offense will result in dismissal or
transfer, as outlined in the school's Memorandum of Understanding.
Class Rules
LATE WORK
Students are expected to submit work on time. Late submissions (assignments)
will incur a 10% grade deduction per day.
APPROPRIATE BEHAVIOR
Students are expected to maintain appropriate behavior during class, as
directed by the instructor. This includes refraining from eating, drinking, or
using cell phones during class. If a student needs to answer a call, they should
excuse themselves and take the call outside.
Class Rules
COMMUNICATION WITH INSTRUCTOR
During the class, students are encouraged to communicate with their
instructor regarding any questions, concerns, or needs related to the course.
Private messages between the student and the instructor are strictly
prohibited. All concerns and questions should be directed to the class
president first, and the president will be the one to communicate with the
instructor.
Note: This rule is in place to promote a transparent and organized
communication process within the class, and to ensure that all students have
equal access to the instructor and to information related to the course.
Class Rules
COMPUTER LABORATORY
Before departing from the computer laboratory, kindly ensure that your
seating area is neat and organized. This consideration ensures a pleasant
experience for fellow students and helps maintain the overall orderliness of
the environment.
GRADING SYSTEM
TOTAL 100%
WHAT IS
COMPUTER
PROGRAMMING?
COMPUTER PROGRAMMING
Attempting to get a computer to complete a specific task without making mistakes.
Computer program instructions are also called program source code and computer
programming is also called program coding.
Computers are dumb. They are only smart because we program them to be.
Binary is a series of 1's and 0 fed and interpreted by the computer.
Computers use 0s and 1s because it is easy to make an electrical device that has
only two stable states.
It would be entirely unpractical to convert every programming instruction you have
into binary by hand. This is where programming languages come into play.
PROGRAMMING LANGUAGE
Programming languages serve as a middle-man of sorts.
Using a programming language, programmers write a series of program statements,
similar to English sentences, to carry out the tasks they want the program to
perform.
Fortunately, programming has evolved into an easier task because of the
development of high-level programming languages. A high-level programming
language allows you to use a vocabulary of reasonable terms, such as read, write, or
add, instead of the sequences of on and off switches that perform these tasks.
Each high-level language has its own syntax, or rules of the language.
MACHINE LANGUANGE
This is the default computer language that is built in primitive
instructions represented to the computer in binary code. Thus, if you
want to instruct a computer, you must write in binary code.
ASSEMBLER
We use these to convert low-level languages into machine code.
Example of low-level languages: Machine language and assembly
language
TRANSLATORS - COMPILERS
The programmer write Java compiler takes java JVM executes the
the code using Java as program as input and bytecode generated by
programming language. generate java bytecode compiler
as output.
ERRORS AND DEBUGGING
Compilers and interpreters issue one or more error messages each time they encounter an invalid
program statement—that is, a statement containing a syntax error, or misuse of the language.
Subsequently, the programmer can correct the error and attempt another translation by compiling or
interpreting the program again. Locating and repairing all syntax errors is the first part of the process of
debugging a program—freeing the program of all errors. illustrates the steps a programmer takes while
developing an executable program.
Programmers call some logical errors semantic errors. For example, if you misspell a programming
language word, you commit a syntax error, but if you use a correct word in the wrong context, you
commit a semantic error.
Syntax errors are discovered when you compile a program, but often you can identify logical errors only
when you examine a program’s first output.
Now that we know what
programming is and how the
computer understand the code,
How do we write code?
Integrated Development Environment
• The answer is we use an IDE (Integrated Development Environment) to
write code
• A place to write, run and debug code and also convert it to machine code
• IDE are like any other program on your computer except used for the
facilitation of code.
• Examples: Netbeans, Eclipse, IntelliJ, visual studios, sublime etc.
• Built in Error-checking
• Auto fill for frequently used words
JAVA BASIC SYNTAX
Terminator (semi-colon)
14
Computer Programming 1
LABORATORY
The End