Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Exam (elaborations)

DESARROLLO DE CLASES

Rating
-
Sold
-
Pages
9
Grade
10 (Matrícula de Hon
Uploaded on
18-01-2026
Written in
2025/2026

Dominio total de la POO, Gestión de Memoria y Relaciones UML.

Institution
Course

Content preview

ud4_prog.md 2026-01-18



UD4 - DESARROLLO DE CLASES

MÓDULO: Programación OBJETIVO: Dominio total de la POO, Gestión de Memoria y Relaciones UML.




1/9

, ud4_prog.md 2026-01-18


🏛 CAPÍTULO 1: ANATOMÍA DE CLASES Y OBJETOS

La base de todo. Si fallas en la definición, el sistema se cae.

1.1 El Concepto: Clase vs Objeto

• La Clase (El Molde): Es una construcción abstracta. Describe un conjunto de objetos que comparten
estructura y comportamiento. Es estática (código en el disco duro).

◦ Analogía: El plano de arquitectura de una casa.

• El Objeto (La Realidad): Es la instancia concreta. Tiene identidad (dirección de memoria), estado (valores) y
comportamiento. Es dinámico (vive en la RAM).

◦ Analogía: La casa construida en la calle Mayor nº 5.

1.2 Estructura del Código

Java impone reglas estrictas:

1. Nombre de Archivo: Debe coincidir exactamente con el nombre de la clase (Case Sensitive). Si la
clase es Autobus, el archivo es Autobus.java.

2. Convención de Nombres: Las clases usan UpperCamelCase (Primera letra mayúscula).

3. Bloque: Todo el código vive entre las llaves { ... } de la clase.

1.3 Atributos (El Estado)

Son las variables que definen cómo es el objeto. Sintaxis: [modificador] tipo nombre;

• Modificadores de Acceso:

◦ private: OBLIGATORIO en examen para cumplir el encapsulamiento. Solo visible dentro de la propia clase.

◦ public: Visible desde cualquier parte (evitar en atributos).

◦ protected: Visible en la clase y en sus hijas (herencia).

Ejemplo del PDF (Clase Taxi)****:



private String matricula; // Texto
private String modelo; // Texto
private int potenciaCV; // Entero




1.4 Métodos (El Comportamiento)

Son las funciones que definen qué hace el objeto. Sintaxis: [modificador] tipoRetorno
nombre([params]) { ... }

El Patrón Getter/Setter


2/9

Written for

Course

Document information

Uploaded on
January 18, 2026
Number of pages
9
Written in
2025/2026
Type
Exam (elaborations)
Contains
Questions & answers

Subjects

$4.09
Get access to the full document:

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Get to know the seller
Seller avatar
jesús6

Also available in package deal

Get to know the seller

Seller avatar
jesús6 Universidad Nacional de Educación a Distancia
Follow You need to be logged in order to follow users or courses
Sold
1
Member since
6 months
Number of followers
0
Documents
17
Last sold
5 months ago

0.0

0 reviews

5
0
4
0
3
0
2
0
1
0

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions