0% found this document useful (0 votes)
33 views

Week1 Intro To Java

The document provides an introduction to the CC102 Fundamentals of Computer Programming course. It outlines the course objectives of introducing students to fundamental programming concepts and computational thinking to develop problem-solving skills. It then lists the class rules for attendance, quizzes, respectful behavior, appropriate technology and laptop use, academic integrity, late work, and communication policies.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
33 views

Week1 Intro To Java

The document provides an introduction to the CC102 Fundamentals of Computer Programming course. It outlines the course objectives of introducing students to fundamental programming concepts and computational thinking to develop problem-solving skills. It then lists the class rules for attendance, quizzes, respectful behavior, appropriate technology and laptop use, academic integrity, late work, and communication policies.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 52

CC102 Fundamentals of Computer Programming

Fundamentals of
Computer Programming

XENIORITA ALONDRA BIO WEEK 1


Course Introduction

The course "Fundamentals of Computer


Programming" (CC102) provides an
essential foundation for understanding
the principles and concepts that underpin
modern software development. This
formal course is designed to introduce
students to the fundamental aspects of
programming and computational thinking,
enabling them to develop logical problem-
solving skills and create functional
software solutions.
CC102 Fundamentals of Computer Programming

CLASS RULES

XENIORITA ALONDRA BIO WEEK 1


Class Rules
ATTENDANCE
Students are expected to attend all classes, arrive on time, and participate
actively in class discussions and activities. Students with complete attendance
will receive +1pt in their final grade (midterm/final).
It is not allowed to have 3 consecutive absences. Acceptable reasons for
missing class include illness (with a medical certificate or prescription), the
death of an immediate family member or a family emergency, religious
observance, and school events. If the absence is deemed valid, the student
may make up any missed quizzes, activities, or machine problems on a date
specified by the instructor, with a proper excuse letter.
Class Rules
QUIZZES
If the lecturer cannot provide an answer sheet, only yellow paper will be used
for quizzes and activities. Students must use a black ballpen. No erasing is
allowed. If a mistake is made, students may use correction tape or pen, or put
parenthesis around the incorrect portion.

RESPECT FOR OTHERS


Students are expected to respect the rights and opinions of others, to engage
in civil discourse, and to refrain from disruptive behavior.
Class Rules
TECHNOLOGY USE
While in the classroom or computer laboratory, the focus should be solely on
educational activities, research, and assignments. Any form of distraction,
including watching TikTok videos, browsing social media apps, or playing
games on phones, is strictly prohibited.

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.

It's essential to responsibly shut down computers after usage. Failure to do


so may lead to unnecessary energy consumption and system strain.
Students are reminded that leaving computers powered on, particularly
following a laboratory session, will result in a deduction of their scores.
Class Rules
LAPTOP AND COMPUTER ACCESS
Students are encouraged to bring their laptops for educational purposes and
have the option to utilize the computer laboratory during discussions for
academic work.
CC102 Fundamentals of Computer Programming

GRADING SYSTEM

XENIORITA ALONDRA BIO WEEK 1


GRADING SYSTEM
WRITTEN OUTPUTS 30%
QUIZZES, HOMEWORKS

PERFORMANCE-BASE OUTPUTS 30%


EXERCISES, MACHINE PROBLEMS

MAJOR EXAM 40%


WRITTEN EXAM, LAB EXAM

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.

Binary is a series of 1's and 0 fed and interpreted by the computer.


ASSEMBLY LANGUANGE
Assembly language are alternatives to machine languages. They use
mnemonics to represent machine language instructions. Since
computers cannot understand assembly language, we use a program
called an assembler to convert assembly language code into machine
language code. Compared to machine language, assembly language
are relatively easier to learn and use, but they are still tedious
because they are closer to machine language.
HIGH LEVEL PROGRAMMING LANGUANGE
The late 90’s ushered in the development of a new generation of
computer programming languages called high-level programming
languages. High-level programming languages are English-like
computer programming languages that are platform independent,
which means code written in high-level language can run on any
machine or computer.
Example: Python, Java, C++, JavaScript, Ruby
TRANSLATORS
TRANSLATORS - ASSEMBLERS
We use translators to convert source code into binary language
(Machine Language). The binary code translated then becomes what
programmers refer to as ‘object code’. Translators can be:

ASSEMBLER
We use these to convert low-level languages into machine code.
Example of low-level languages: Machine language and assembly
language
TRANSLATORS - COMPILERS

Compilers convert source code to binary code then


execute the binary. If the program runs into an error
during the execution process, the compilation stops
without creating a binary. The most popular compiled
languages are: C, C++, Objective C, Swift, and Pascal.
TRANSLATORS - INTERPRETER

Interpreters are similar to compilers but instead of running the


entire program, they convert the code line by line (statement).
This means that every line of code runs until an error occurs.
Once the program returns an error, the interpreter
automatically stops and reports the error. The most popular
interpreted languages are: Python, Ruby, JavaScript and Pearl.
TRANSLATORS - HYBRID

Hybrid translators are a combination of compilers and


interpreters. They convert the source code into Bytecode.
Runtime engines then translate and execute the bytecode. The
main example here is Java that uses the Java Virtual Machine
(JVM) .
WHY IS THE
LANGUAGE
NAMED JAVA?
Programming Language : JAVA
Java is a general, all-purpose computer programming language that is circumstantial,
class-based, object-oriented, and specially designed to have few application
dependencies as possible.
Created by James Gosling from sun microsystems (sun) 1991
First public version, Java 1.0 was released in 1995
Oracle called this open JDK (Java Development Kit)
As of March 2023, Java 20 is the latest released Java version. In September 2023,
Java 21 will follow.
Sun was acquired by the Oracle Corp. in 2010 (Steermanship for java)
Important terms in the
context of Java
programming
Java Development Kit (JDK)
The Java Development Kit is a software package that includes
everything needed for developing Java applications. It contains
the Java Compiler, various development tools, libraries, and
documentation. The JDK is required if you want to write,
compile, and build Java programs. It includes the JRE as well,
since you need the runtime environment to test your
applications during development.
JRE (Java Runtime Environment)
The Java Runtime Environment is a software package that provides
the necessary runtime components to run Java applications. It
includes the Java Virtual Machine (JVM), along with libraries and
other components required for executing Java programs. JRE is
intended for users who want to run Java applications without
necessarily developing them. In essence, it provides the environment
in which Java code can be executed.
JVM (Java Virtual Machine)
The Java Virtual Machine is a crucial component of the Java
platform. It's responsible for executing Java bytecode, which is the
compiled form of Java source code. The JVM is platform-
independent, meaning that you can write Java code once and run it
on any system with the appropriate JVM installed. It manages
memory, handles garbage collection, and provides other runtime
services necessary for Java applications to run efficiently.
SUMMARY:
In summary, the JRE provides the runtime environment to execute
Java applications, the JVM executes Java bytecode and manages
runtime operations, the JDK is used for developing Java applications
and includes the compiler, the compiler translates human-readable
Java source code into bytecode, and the JVM (partly) acts as an
interpreter to execute bytecode efficiently.
The program
development process
Programming Language : JAVA
The Java compiler translates your Java program into a language called bytecode.
This bytecode is not the machine language for any particular computer, but it is
similar to the machine language of most common computers.
The Java Virtual Machine (JVM) is an interpreter that translates and executes
bytecode. Java bytecode runs on any computer that has a JVM.
You normally will give two commands, one to compile your Java program into
bytecode and one to run your program. The run command tells the interpreter to
execute the bytecode. This run command might be called “run” or something else,
but it is unlikely to be called “interpret.”
PHASES OF PROGRAMMING

WRITE COMPILE RUN

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

XENIORITA ALONDRA BIO WEEK 1


GETTING STARTED:
INSTALLING JDK AND
NETBEANS
JDK Download link:
https://www.oracle.com/ph/java/technologies/downloads/
Click the downloaded file and install:
Setting Java Path in Environmental Variable:
Go to the file location and locate java > jdk-18.0.2.1 > bin
and then copy the path
Setting Java Path in Environmental Variable:
Search for Edit system environment variables in your pc
Setting Java Path in Environmental Variable:
Click Environment Variables. Next, Select path
and then edit.
Setting Java Path in Environmental Variable:
Click new, paste the copied file path and then click OK
Check if you have successfully install it on your computer:
Open your Cmd (win + r) and type cmd
When the dialog opens type this command: java –version then
hit enter. If it shows the Java version you are good to go.
Installation of Netbeans:
https://dlcdn.apache.org/netbeans/netbeans-
installers/18/Apache-NetBeans-18-bin-windows-x64.exe
Click the downloaded file and run it. Click next and accept the
Terms of Agreement.
Install Netbeans:
Accept the Terms of Agreement. You can change the
installation loaction by browsing. Click next and install.
Install Netbeans:
Wait for the installation to finish and then click finish. Open
the application
Print “Hello World!”
CC102 – Fundamentals of Computer Programming

The End

XENIORITA ALONDRA BIO WEEK 1

You might also like