Garantie de satisfaction à 100% Disponible immédiatement après paiement En ligne et en PDF Tu n'es attaché à rien
logo-home
Summary - Programming Fundamentals (Java OOP) €5,51   Ajouter au panier

Resume

Summary - Programming Fundamentals (Java OOP)

 7 vues  0 achat
  • Cours
  • Établissement

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...

[Montrer plus]

Aperçu 4 sur 81  pages

  • 25 juin 2024
  • 81
  • 2023/2024
  • Resume
  • Inconnu
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

Les avantages d'acheter des résumés chez Stuvia:

Qualité garantie par les avis des clients

Qualité garantie par les avis des clients

Les clients de Stuvia ont évalués plus de 700 000 résumés. C'est comme ça que vous savez que vous achetez les meilleurs documents.

L’achat facile et rapide

L’achat facile et rapide

Vous pouvez payer rapidement avec iDeal, carte de crédit ou Stuvia-crédit pour les résumés. Il n'y a pas d'adhésion nécessaire.

Focus sur l’essentiel

Focus sur l’essentiel

Vos camarades écrivent eux-mêmes les notes d’étude, c’est pourquoi les documents sont toujours fiables et à jour. Cela garantit que vous arrivez rapidement au coeur du matériel.

Foire aux questions

Qu'est-ce que j'obtiens en achetant ce document ?

Vous obtenez un PDF, disponible immédiatement après votre achat. Le document acheté est accessible à tout moment, n'importe où et indéfiniment via votre profil.

Garantie de remboursement : comment ça marche ?

Notre garantie de satisfaction garantit que vous trouverez toujours un document d'étude qui vous convient. Vous remplissez un formulaire et notre équipe du service client s'occupe du reste.

Auprès de qui est-ce que j'achète ce résumé ?

Stuvia est une place de marché. Alors, vous n'achetez donc pas ce document chez nous, mais auprès du vendeur williamdaniel. Stuvia facilite les paiements au vendeur.

Est-ce que j'aurai un abonnement?

Non, vous n'achetez ce résumé que pour €5,51. Vous n'êtes lié à rien après votre achat.

Peut-on faire confiance à Stuvia ?

4.6 étoiles sur Google & Trustpilot (+1000 avis)

72841 résumés ont été vendus ces 30 derniers jours

Fondée en 2010, la référence pour acheter des résumés depuis déjà 14 ans

Commencez à vendre!
€5,51
  • (0)
  Ajouter