100% tevredenheidsgarantie Direct beschikbaar na je betaling Lees online óf als PDF Geen vaste maandelijkse kosten
logo-home
Summary - Programming Fundamentals (Java OOP) $5.98
In winkelwagen

Samenvatting

Summary - Programming Fundamentals (Java OOP)

 0 keer verkocht
  • Vak
  • Instelling

In-depth notes covering Object Oriented Programming in Java especially. The three pillars of OOP (Encapsulation, Abstraction, Polymorphism), how the JVM works, bytecode, public and private methods, classes, objects, constructors and their relationships. Basics of fields vs methods, case and UML dia...

[Meer zien]

Voorbeeld 4 van de 81  pagina's

  • 25 juni 2024
  • 81
  • 2023/2024
  • Samenvatting
  • Onbekend
avatar-seller
Programming Fundamentals (COM1027)


Eclipse Shortcuts: https://www.digitalocean.com/community/tutorials/eclipse-
shortcuts
Windows 11 Shortcuts:
https://support.microsoft.com/en-us/windows/windows-keyboard-shortcuts-
3d444b08-3a00-abd6-67da-ecfc07e86b98


1) What is Object-Oriented Programming? Object-oriented programming (OOP) is a
programming paradigm based on the concept of
"objects", which can contain data and code: data
in the form of fields (often known as attributes or
properties), and code, in the form of procedures
(often known as methods).

2) What is Encapsulation and Abstraction? Encapsulation and Abstraction - to achieve those
two principles private, public and protected fields
are used.

3) What is Class Hierarchy? A term that is linked closely to Inheritance, here
we have subclasses or so-called child classes in the
hierarchy that inherit key components of the
parent class.

4) What is Polymorphism? Similar to inheritance but takes a step further; it
enables an object of a class to take different forms;
in other words, the child class object can take the
form or the functionality of its parent class as
well as use the defined methods to extend that
functionality and perform additional tasks.

,5) How does Java run and how is it Java applications are designed to operate on any
different from other languages? platform that has a Java Virtual Machine (JVM)
installed;
think of the JVM as a software platform to run
Java programs on.

In theory, a programmer can write a
single application in Java, and it will execute
similarly on any piece of hardware with an
installed JVM. That makes Java a write-once-
run-everywhere language, meaning that it is
platform independent.


6) How does Java work? To be platform independent, means that Java
cannot be translated directly to machine
language, therefore it introduces an intermediate
language called bytecode or *.class. The Java
source code is translated into bytecode via the
compiler, and the JVM on each device can then
determine the best way in which to execute the
bytecode instructions.




7) How is source code set up in Java? In the Java programming language, all source
code is first written in plain text files ending with
the .java extension.

A Java source code file can contain one or more
Java classes, however only one of them can be
defined as public. The name of the public class
and the filename of the source code file must
match,

8) What is Bytecode? Those source files (.java) are then compiled
into .class files by the javac compiler. A .class file
does not contain code that is native to your

, processor; but instead the machine language of
the JVM. The .class files are called bytecode.

In other words, bytecode is really a form of
intermediate language rather than a true
machine code. This means that the process of
turning Java source code into bytecode is not
really a type of compilation in the sense that a C
or C++ programmer would understand it.

During compilation if any errors are found, then
the compilation process ends. Once the errors are
fixed (removed, modified or corrected), then the
program goes through the compilation process
once again. If no errors occur, the bytecode file
(.class) is created and handed over to the Java
Virtual Machine (JVM) for interpretation.

9) What is a Java Virtual Machine? What JVM is a virtual machine used in Java
is JIT? programming platform to execute or run Java
programs. It is an engine that allocates memory
space and converts Java bytecode into machine
language, making Java platform-independent.

JIT stands for ‘Just-in-time’ compilation and it is
part of JVM responsible for executing the
compilation to native machine code.

Java is both compiled and interpreted.

10) How do you format blocks of code in The class definition must go within a pair of curly
Java? braces, { and }. Within the class you can have one
or more methods, selection statements or
repetition statements that also need curly braces,
forming nested braces: { {} {} } Whitespace and
indentation etc. is for human readability and has
no syntactic significance in Java.

Excess whitespace or ’wrong’ indentation will
have no negative effect on the compiler!

, 11) What is the difference between Public Public methods/ variables are accessible to all
and Private? classes whereas the private ones are not.

Public fields and methods are externally visible
– Public fields (external fields)
- Public methods (external methods)

»Private fields and methods are internally visible
- Private fields (internal fields)
- Private methods (internal methods)

»Internal fields are safe from external changes

»Internal methods are implementation detail
- Provide common functionality used through the
class
- Not exposed as part of the interface (or contract)
of the class

12) What is the Main Method? Main method – This is the entry/execution
starting point of a java program. In other words,
that is the first thing that runs.




13) What is a class? A class is a blueprint, template, or prototype. A
class consists of attributes (which become
fields/variables and later on define the state of the
object) and behaviours (which are executed by
methods and later on may affect the state of the
object).

A class encapsulates:
- Attributes: fields
(also known as instance variables or properties)
- Behaviour: methods

Dit zijn jouw voordelen als je samenvattingen koopt bij Stuvia:

Bewezen kwaliteit door reviews

Bewezen kwaliteit door reviews

Studenten hebben al meer dan 850.000 samenvattingen beoordeeld. Zo weet jij zeker dat je de beste keuze maakt!

In een paar klikken geregeld

In een paar klikken geregeld

Geen gedoe — betaal gewoon eenmalig met iDeal, Bancontact of creditcard en je bent klaar. Geen abonnement nodig.

Focus op de essentie

Focus op de essentie

Studenten maken samenvattingen voor studenten. Dat betekent: actuele inhoud waar jij écht wat aan hebt. Geen overbodige details!

Veelgestelde vragen

Wat krijg ik als ik dit document koop?

Je krijgt een PDF, die direct beschikbaar is na je aankoop. Het gekochte document is altijd, overal en oneindig toegankelijk via je profiel.

Tevredenheidsgarantie: hoe werkt dat?

Onze tevredenheidsgarantie zorgt ervoor dat je altijd een studiedocument vindt dat goed bij je past. Je vult een formulier in en onze klantenservice regelt de rest.

Van wie koop ik deze samenvatting?

Stuvia is een marktplaats, je koop dit document dus niet van ons, maar van verkoper williamdaniel. Stuvia faciliteert de betaling aan de verkoper.

Zit ik meteen vast aan een abonnement?

Nee, je koopt alleen deze samenvatting voor $5.98. Je zit daarna nergens aan vast.

Is Stuvia te vertrouwen?

4,6 sterren op Google & Trustpilot (+1000 reviews)

Afgelopen 30 dagen zijn er 65040 samenvattingen verkocht

Opgericht in 2010, al 15 jaar dé plek om samenvattingen te kopen

Start met verkopen

Laatst bekeken door jou


$5.98
  • (0)
In winkelwagen
Toegevoegd