0% found this document useful (0 votes)
93 views10 pages

ULO 1 Week 1

This document provides an overview of the unit learning outcomes for a course on Java programming. The course will cover program structure, basic Java elements, control structures for branching and looping, user-defined methods, and developing applications. Specifically, the first 3 weeks will discuss Java programming fundamentals like program structure, basic elements, and applying concepts in programs. Control structures for efficient implementation of branching and looping algorithms will be covered in weeks 4-5. Weeks 6-8 will explore user-defined methods and manipulating records. Students will apply all concepts by developing a self-directed application.

Uploaded by

Gaming Hack
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)
93 views10 pages

ULO 1 Week 1

This document provides an overview of the unit learning outcomes for a course on Java programming. The course will cover program structure, basic Java elements, control structures for branching and looping, user-defined methods, and developing applications. Specifically, the first 3 weeks will discuss Java programming fundamentals like program structure, basic elements, and applying concepts in programs. Control structures for efficient implementation of branching and looping algorithms will be covered in weeks 4-5. Weeks 6-8 will explore user-defined methods and manipulating records. Students will apply all concepts by developing a self-directed application.

Uploaded by

Gaming Hack
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
You are on page 1/ 10

College of Computing Education

3rd Floor, DPT Building


Matina Campus, Davao City
Telefax: (082)
Phone No.: (082)300-5456/305-0647 Local 116

UNIT LEARNING OUTCOME (ULO)

Week ULO
1
Discuss the program structure and the basic elements of Java
2
programming and apply them appropriately in a program.
3
4 Use Control structures to efficiently implement branch and
5 looping algorithm in programs
6
7 Explore user-defined methods and ways of manipulating
8 records and to correctly apply all concepts in a self-developed
9 application

ULO 1 (WEEK 1-3)

Discuss the program structure and the basic elements of Java programming and apply them
appropriately in a program.

METALANGUAGE

In this ULO, you will encounter the following terms frequently:

Programming Language are languages that people us which are similar to human
language, which will be translated into machine code for the computer to understand.

Algorithm is a step-by-step problem-solving process in which a solution is arrived at in a


finite amount of time.

Flowchart is a graphical form of problem-solving process.

A Token is a smallest individual unit of a program.

Comments are denoted by // for a single line comment and /* at the start of a block of
statements to comment and */ to close the block of statements that you want to comment.

Identifiers are Nouns that describe identities of variables.

Data types specify the different sizes and values that can be stored in the variable.

Primitive type variables directly store data into their memory space.

Reference variables store the address of the object containing the data.
College of Computing Education
3rd Floor, DPT Building
Matina Campus, Davao City
Telefax: (082)
Phone No.: (082)300-5456/305-0647 Local 116

WEEK 1: PROGRAMMING OVERVIEW

ESSENTIAL KNOWLEDGE

There will be THREE sections in this week’s learning:

1. Evolution of Programming Languages


2. Programming Methodologies
3. Flowcharting and Algorithm

1. Evolution of Programming Languages

To build programs, people use languages that are similar to human language. The
results are translated into machine code, which computers understand.

Programming languages have evolved over the years. The following shows a
timeline of the evolution up to year 2000.
College of Computing Education
3rd Floor, DPT Building
Matina Campus, Davao City
Telefax: (082)
Phone No.: (082)300-5456/305-0647 Local 116

Programming languages fall into three broad categories:

(a) Machine languages

• These are the first generation languages that are the most basic type of
computer languages, consisting of strings of numbers the computer’s
hardware can use.
• The different types of hardware use different machine code. For eg. IBM
computers use different machine language than Apple computers.

(b) Assembly languages

• These are the second-generation languages and are somewhat easier to


work with than machine languages
• To create programs in assembly language, developers use cryptic English-
like phrases to represent strings of numbers.
• In assembly language, an instruction is an easy-to-remember form called
mnemonic
• The code is then translated into machine language, using a translator called
an assembler

(c) Higher-level languages

• Higher-level languages are more powerful than assembly language and allow
the programmer to work in a more English-like environment.
• Higher-level programming languages are divided into three “generations”,
each more powerful than the previous:
o Third-generation languages (eg. FORTRAN, COBOL, C, C++,
BASIC)
o Fourth-generation languages (eg. SOL, CSS, Coldfusion)
o Fifth-generation languages (eg. Mercury, Prolog, OPS5)

Java is a third-generation language


College of Computing Education
3rd Floor, DPT Building
Matina Campus, Davao City
Telefax: (082)
Phone No.: (082)300-5456/305-0647 Local 116

To run a Java program:


1. Java instructions need to be translated into an intermediate language
called bytecode
2. Then the bytecode is interpreted into a particular machine language
Compiler: a program that translates a program written in a high-level
language into the equivalent machine language
In the case of Java, this machine language is the bytecode
Java Virtual Machine (JVM): hypothetical computer developed to make
Java programs machine independent

The following is an example of a Java program

And the output is My first Java program.

To process a Java program,

• Source program: written in a high-level language


• Loader: transfers the compiled code (bytecode) into main memory
• Interpreter: reads and translates each bytecode instruction into
machine language and then executes it

2. Programming Methodologies

It is important to understand that in order to come up with a good program that meets
the requirements of the user, the Problem-Analysis-Coding-Execution cycle should
be adopted. The programmer should use the algorithm and the flowchart to help
him.
• Algorithm: a step-by-step problem-solving process in which a solution is
arrived at in a finite amount of time
• Flowchart : a graphical form of problem-solving process.
College of Computing Education
3rd Floor, DPT Building
Matina Campus, Davao City
Telefax: (082)
Phone No.: (082)300-5456/305-0647 Local 116

A problem-solving process involves the following steps:


• Analyze the problem and outline the problem and its solution requirements
• Design an algorithm to solve the problem
• Implement the algorithm in a programming language, such as Java
• Verify that the algorithm works
• Maintain the program by using and improving it and modifying it if the problem
domain changes

Two basic approaches to programming design


• Structured design
o A problem is divided into smaller subproblems
o Each subproblem is solved
o The solutions of all subproblems are then combined to solve the
problem
• Object-oriented design
o In OOD, a program is a collection of interacting objects
o An object consists of data and operations
o Steps in OOD
1. Identify objects
2. Form the basis of the solution
3. Determine how these objects interact
College of Computing Education
3rd Floor, DPT Building
Matina Campus, Davao City
Telefax: (082)
Phone No.: (082)300-5456/305-0647 Local 116

3. Flowcharting and Algorithm

Flowchart is a graphical representation of an algorithm. Programmers often use it as


a program-planning tool to solve a problem. It makes use of symbols which are
connected among them to indicate the flow of information and processing.
The process of drawing a flowchart for an algorithm is known as “flowcharting”.

Symbol Name Function


Represents start or end
Start/End point. Every flowchart
must have one START
and one END
A line is a connector that
Arrows shows relationships
between the
representative shapes
A parallelogram
Input/Output represents input or output

A rectangle represents a
Process process

A diamond represents a
Decision decision

To connect to another
On-page connector symbol on the same page

To create a reference
Off-page Connector from a process on one
page to a process on
another page.
A hexagon represents the
Initialization assignment of initial
values to a variable.

Three Control Structure of a Program

1. Sequence - Straight forward, which means that the statements in a code are
executed one after another in the order as it is written in algorithm or in the source
code.
College of Computing Education
3rd Floor, DPT Building
Matina Campus, Davao City
Telefax: (082)
Phone No.: (082)300-5456/305-0647 Local 116

Check the example below showing the algorithm and it’s equivalent flowchart
for SEQUENCE Structure.
College of Computing Education
3rd Floor, DPT Building
Matina Campus, Davao City
Telefax: (082)
Phone No.: (082)300-5456/305-0647 Local 116

2. Selection- also referred to as a conditional structure, that performs different


processes based on whether a certain condition is true or false. It uses relational
operators to test conditions.

Basic Mathematical Operators


College of Computing Education
3rd Floor, DPT Building
Matina Campus, Davao City
Telefax: (082)
Phone No.: (082)300-5456/305-0647 Local 116

3. Iteration or Loop - executes a sequence of statements repeatedly as long as a


condition is still true. The iteration or loop structure is used to execute a sequence
of statements and ends the sequence once the condition becomes false.
College of Computing Education
3rd Floor, DPT Building
Matina Campus, Davao City
Telefax: (082)
Phone No.: (082)300-5456/305-0647 Local 116

SELF-HELP

For flowcharting tool, take note that you can use available online flowcharting software like
LucidChart at http://lucidchart.com. It also provides templates which you can use. You can
also simply use the Microsoft Word to do your flowchart.

The following are resources that you can use in the course of learning this subject:

• Smith, Jo ann (2015). Programming Logic and Design, Cengage Learnings (Lab
Manual)
• Pomperada, Jake et. al (2016). Intro to Java Programming, Mindshapers Co., Inc, Great
Books
• Padre, Nilo et .al. (2016). Programming Concepts: Logic Formulation
• Berkovic, et. al (2016). Computers and Programming: Theory and Problems
• Joyce Farrell (2015). PROGRAMMING LOGIC AND DESIGN Introductory Version 8th
Edition
• Ford, Jerry Lee (2015). Programming for the Absolute Beginner, Cengage Learning,
https://ebookcentral.proquest.com/lib/uniofmindanao-ebooks/detail.action?docID=3136799
• Malik, D.S (2010). Java Programming. From Problem Analysis to Program Design.

You are not limited to these resources. Feel free to do your research and learning from the
internet and Youtube lessons!

You might also like