0% found this document useful (0 votes)
2 views36 pages

Cc102 Module 1 Introduction To Computer Programming

The document serves as an introduction to computer programming, covering essential concepts such as programming tools, hardware, software, and the programming process. It specifically focuses on Java programming, detailing its components, structure, and syntax, including class definitions and methods. Additionally, it emphasizes the importance of problem definition, analysis, and algorithm development in programming.

Uploaded by

jjrpkf
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views36 pages

Cc102 Module 1 Introduction To Computer Programming

The document serves as an introduction to computer programming, covering essential concepts such as programming tools, hardware, software, and the programming process. It specifically focuses on Java programming, detailing its components, structure, and syntax, including class definitions and methods. Additionally, it emphasizes the importance of problem definition, analysis, and algorithm development in programming.

Uploaded by

jjrpkf
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Introduction to

Computer Programming
4 5

GTMuñoz For classroom use only. Redistribution prohibited.


What
Information

✓ It includes the tools and systems


that help people and organizations
manage data and communicate
efficiently.
GTMuñoz For classroom use only.
Redistribution prohibited.
Technology

✓ Computer hardware (computers


and devices)
✓ Software development
✓ Data storage and security

GTMuñoz For classroom use only.


Redistribution prohibited.
What
a Program

GTMuñoz For classroom use only.


Redistribution prohibited.
What is a
programmer?

How to create
a program?

Who can be a
programmer?

GTMuñoz For classroom use only. Redistribution prohibited.


4. Coding and
Debugging

3. Algorithm
Development

2. Problem
Analysis

[Link]
Definition

GTMuñoz For classroom use only.


Redistribution prohibited.
Problem

Definition

“What do I want the


computer to do?”
GTMuñoz For classroom use only.
Redistribution prohibited.
Problem

Analysis

“What programming “Do I need other hardware


language should I use?” or software?”
Algorithm

Development

GTMuñoz For classroom use only.


Redistribution prohibited.
Coding
4
Debugging

GTMuñoz For classroom use only.


Redistribution prohibited.
Introduction
JAVA
Java is used for:

GTMuñoz For classroom use only.


Redistribution prohibited.
GREENTALK
GTMuñoz For classroom use only.
Redistribution prohibited.

JVM

JDK •

JRE •

GTMuñoz For classroom use only.


Redistribution prohibited.
JAVA

Building Blocks
Parts of Java Program
Insert blank lines in programs to make them easier to read

Program output:
Hello, BSIT Students!

Class header marks the beginning of a class definition. “//” marks the beginning of a comment.
A class serves as a container for an application

GTMuñoz /*Program output: For classroom use only.


Hello, BSIT Students!*/ Redistribution prohibited.
Parts of Java Program
Is a java keyword. Indicates the beginning of a
It must be written in class definition.
lowercase letters. The name of the class made up by the programmer.

In short: This line tells the compiler that a publicly Known as an access specifier.
accessible class named “Parts” is being defined. Is a java keyword.
The public specifier means access
It must be written in
to the class is unrestricted
lowercase letters.
(“Open to public”).

GTMuñoz For classroom use only. Redistribution prohibited.


Parts of Java Program
Left brace or opening brace associated with the beginning of the The method header marks the beginning of a method.
class definition. The name of this method is “main”.
The rest of the words are required for the method to be properly define.

Right brace or closing brace. Everything between the two


braces is the body of the class named Parts. Every java application must have a method named “main”.
This is the starting point of an application.

Left brace or opening brace associated with the beginning of the


main method.

In short: This line displays a message on the screen.


The message “Hello, BSIT Students!” is printed on the screen without
Right brace or closing brace. Everything between the two quotation marks.
braces is the body of the method main.
GTMuñoz For classroom use only. Redistribution prohibited.
Parts of Java Program
At the end of the line is a semicolon “;”.
A semicolon marks the end of a statement in java.

GTMuñoz For classroom use only.


Redistribution prohibited.
public class Sample{

public static void main(String[]args){


[Link](“Hello”);
}
}
GTMuñoz For classroom use only.
Redistribution prohibited.
The main
method The Curly
braces {}

The Semicolon ;
[Link]()

• •

GTMuñoz For classroom use only. Redistribution prohibited.


Double Quotes

GTMuñoz For classroom use only. Redistribution prohibited.


Print Text:

GTMuñoz For classroom use only. Redistribution prohibited.


The print() Method

GTMuñoz For classroom use only.


Redistribution prohibited.


Single-line Comment

GTMuñoz For classroom use only.


Redistribution prohibited.
Multi-line Comments


Single or multi-line comments?




GTMuñoz For classroom use only.
Redistribution prohibited.
Thanks

listening

You might also like