M1 FORMATIVE Fundamental Concepts and Intro To OOP DELOS REYES

Download as pdf or txt
Download as pdf or txt
You are on page 1of 7

MODULE 1

EXERCISE

1
Fundamental Concepts
Introduction to Object-Oriented Programming

John Ryan C. Delos Reyes


Format &
Presentation ( 5% ) :
Timeliness (20%) :
Correctness ( 15% ) :
<T31>
Machine Code
Instruction used (25%) :
Output (25%) :
Time (10%) :
<1/19/2021>
Grade :

Activity 1: Fundamental Concepts


COMPUTER ENGINEERING DEPARTMENT
Object-Oriented Programming

Module 1: Fundamental Concepts and Introduction to Programming

1.1.1 Program Outcomes (POs)


a. ability to design and conduct experiments, as well as to analyze and interpret data
d. ability to function on multidisciplinary teams
e. ability to identify, formulate and solve engineering problems

1.1.2 Activity’s Intended Learning Outcomes (AILOs)


At the end of this activity, the student shall be able to:
a. define terms
b. understand the concept of Object-Oriented programming

1.1.3 Objectives of the Activity


The objectives of this activity are to:
a) Define what is Object-Oriented Programming
b) Understand object, class, inheritance and package.

1.4 Principle of the Activity


Object-Oriented programming is a programming methodology that defines objects whose
behaviors and interactions accomplish a given task.

It is considered as the newest programming language and more powerful paradigm. The object-
oriented programming requires the designer to specify the data structures as well as the types of
operations to be applied to those data structures. Using this language in a program is made up of a
set of cooperating objects instead of an instruction list.

Activity 1: Fundamental Concepts


1.1.5 Materials/Equipment

Computer Unit

1.1.6 Procedure/s

Briefly discuss the following number.


1. Types of Programming language.
• Scripting Programming Language
- A programming language for the unique run-time environment that automates tasks'
execution could be executed one-by-one by the human operator. It is often interpreted rather
than compiled.
• Procedural Programming Language
- it is used to execute a sequence of statements that lead to a result. It uses multiple variables,
heavy loops, and other elements, separating them from functional programming languages. It
may control variables other than the function’s value returns.
• Functional Programming Language
- A programming language whose primary focus is on the return value of functions and side
effects and different suggests that storing states are discouraged. Functional languages are a
more comfortable and user-friendly way to figure on abstract issues.
• Logic Programming Language
- PROLOG (programming in logic) is a well-known state of a program as a logical
relationship. Such languages are similar to the SQL database language
• Object-Oriented Programming Language
- This computer programming model organizes software design around data, or objects, rather
than functions and logic. An item called an object is a data field that has unique attributes and
behavior
2. Software/Program Development life cycle.
➢ The Software Development Life Cycle (SDLC) refers to a methodology with clearly defined
processes for creating high-quality software. It consists of a detailed plan describing how to
develop, maintain, replace, and alter or enhance specific software.
3. Define the OOP concepts in Java.
➢ OOP concepts in Java are the main ideas behind Java’s Object-Oriented Programming. They
are abstraction, encapsulation, inheritance, and polymorphism. Grasping them is key to
understanding how Java works. Java OOP concepts let us create working methods and variables,
then re-use all or part of them without compromising security.
4. What are the four main OOP concepts in Java? Define or describe each.
➢ These are abstraction, encapsulation, inheritance, and polymorphism. Abstraction means
depicting complex ideas using straightforward terms. Encapsulation is a way of securing the
fields inside a class private, which then provides access to them through the public methods.
Inheritance, on the other hand, a special feature of Object-Oriented Programming which enables
programmers to make new classes that has some attributes of existing classes. Polymorphism is a
Java OOP concept lets programmers use the same word to mean different things in different
contexts.
5. How OOP concepts in Java work?
• How abstraction works?
Abstraction is a process where you show only “relevant” data and “hide” unnecessary details of
an object from the user. For example, when you log in to your bank account online, you enter

Activity 1: Fundamental Concepts


your user id and password and press login. What happens when you press login, how the input
data sent to the server and how it gets verified is all abstracted away from you.
• How encapsulation works?
Encapsulation allows us to protect the data stored in a class from system-wide access. As its
name suggests, it safeguards the internal contents of a class like a real-life capsule. You can
implement encapsulation in Java by keeping the fields (class variables) private and providing
public getter and setter methods to each of them. Java Beans are examples of fully encapsulated
classes.
• How inheritance work?
When one object acquires all the properties and behaviors of a parent object, it is known as
inheritance. It provides code reusability. It is used to achieve runtime polymorphism.
• How polymorphism work?
This technique meaning "many forms or shapes" allows programmers to render multiple
HTML elements depending on the type of object. This concept allows programmers to redefine
the way something works by changing how it is done or by changing the parts in which it is
done. Terms of polymorphism are called overriding and overloading.
6. Discuss the history of Java programming language.
➢ The Java language was initially called OAK. Originally, it was developed for handling devices
and set-top boxes. Oak was a massive failure. Thus, in 1995 Sun changed the name to Java and
modified the language to take advantage of the burgeoning World Wide Web development
business. Later, in 2009, Oracle Corporation acquired Sun Microsystems and took ownership of
two key Sun software assets: Java and Solaris.
7. Identify the Java technology platforms.
➢ The four platforms of the Java programming language are the following: Java Platform, Standard
Edition (Java SE), Java Platform, Enterprise Edition (Java EE), Java Platform, Micro Edition
(Java ME) and Java FX. All Java platforms consist of a Java Virtual Machine (VM) and an
application programming interface (API). The Java Virtual Machine is a program, for a particular
hardware and software platform, that runs Java technology applications.
8. What are the features of Java technology?
➢ Java is a general-purpose, class-based, object-oriented programming language designed for
having lesser implementation dependencies. It is a computing platform for application
development. Java is fast, secure, and reliable, therefore. It is widely used for developing Java
applications in laptops, data centers, game consoles, scientific supercomputers, cell phones, etc.
Other features of Java are also known as java buzzwords. The most important features of which
are Simple, Object-Oriented, Portable, Platform independent, Secured, Robust, Architecture
neutral, Interpreted, High Performance, Multithreaded, Distributed and Dynamic.
9. Discuss briefly the Java platforms editions.
➢ Java Platform, Standard Edition (Java SE): Java SE's API offers the Java programming language's
core functionality. It defines all the basis of type and object to high-level classes. It is used for
networking, security, database access, graphical user interface (GUI) development, and XML
parsing. Java Platform, Enterprise Edition (Java EE): The Java EE platform offers an API and
runtime environment for developing and running highly scalable, large-scale, multi-tiered,
reliable, and secure network applications. Java Programming Language Platform, Micro Edition
(Java ME): The Java ME platform offers an API and a small-footprint virtual machine running
Java programming language applications on small devices, like mobile phones. Lastly, JavaFX is
a platform for developing rich internet applications using a lightweight user-interface API. It user
hardware-accelerated graphics and media engines that help Java take advantage of higher-
performance clients and a modern look-and-feel and high-level APIs for connecting to networked
data sources.
10. What are the different Phases of a Java program?
➢ Edit is when a program is created in an editor, stored on a disk with a filename that ends with
Activity 1: Fundamental Concepts
.java. Compile creates bytecodes and stores them on disk in a file ending with .class. Load class
loader reads the .class files containing bytecodes from disk and puts those bytecodes in memory.
Verify is done when a bytecode verifier confirms that all bytecodes are valid and do not violate
java’s security restrictions. Lastly, execute is where the whole program is executed to display the
result.
11. Compare Java with C++ language.
➢ C++ uses only compiler, whereas Java uses both compiler and interpreter. Another thing is that
C++ supports both operator overloading & method overloading whereas Java only supports
method overloading. To add up, C++ supports manual object management with the help of new
and delete keywords whereas Java has built-in automatic garbage collection. While these things
happen, C++ supports structures whereas Java does not support structures. Lastly, C++ supports
unions while Java does not support unions.

12. What are the benefits of using Java language?

➢ Benefits of using Java language include simplicity due to its straightforward characteristics and
less complex approach. Another is its object-oriented nature that performs standard programs and
reusable codes. Platform independency where it does not require special programs or software
and along with this is its distributed computing that allows several computers on a network to
work together. Security advantages on Java because it has no explicit pointer. Apart from this, it
has a security manager that defines the access of classes. Memory allocation due to its division
properties. In Java, memory is divided into two parts one is heap and another is stack. Whenever
we declare a variable JVM gives memory from either stack or heap space. It helps to keep the
information and restore it easily. Lastly, it is multithreaded because it has the capability of a
program to perform many tasks at the same time.

Activity 1: Fundamental Concepts


Section: T31 Date Performed: 1/19/2021

Course Code: CPE0017L Date Submitted: 1/19/2021

Course Title: Object Oriented Programming

Instructor: Ms. Ethel Mansala

Group No.: N/A Activity No.: 1

Name: John Ryan C. Delos Reyes Signature:

Activity 1: Fundamental Concepts


1.8 Rating

Criteria Grade

Activity Conduct (1-5)

Correctness of Command(s)/Program(s) (1-5) x 2

Completeness of Tasks (1-5)

Data Analysis and Results Interpretation (1-5)

Total Score

Mean Score = (Total Score / 5)

Percentage Score = (Total Score/25) * 100


Other Comments:

Activity 1: Fundamental Concepts

You might also like