Java OOP Code Samples: Shapes, Resizable, Inner Classes

Java OOP Code Samples: Shapes, Resizable, Inner Classes

Summary: This page presents several Java object-oriented examples in one place. Examples include abstract classes for shapes, a resizable Rectangle via an interface, nested inner classes, a custom exception, and a small package usage example. The original code is preserved as a preformatted block below.

Complete Java Examples (original content preserved)

abstract class Shape {
abstract double calculateArea();
abstract double calculatePerimeter(
Read More

Colonialism, Race, and Black Religious Repair

Week 1: Introduction and “Sinners”

Big Question: How did colonialism shape the idea of “Black religion”?

Religion functions as a political tool of empire, defining who is considered human, rational, or civilized.

Core Logic: Colonialism → Race → “Black Religion” → Fetishism/Primitivism → Dehumanization → Hoodoo as Repair → Sinners reclaims sacred meaning. (Johnson notes that Afro-Euro trade beginning in 1441 marks the origin of racialized religion.)

Key Scholars

  • Drake: Europeans labeled
Read More

Computer Networks: Types, Topology, and Internet Essentials

Computer Networks: Fundamentals and Resource Sharing

A computer network is a system of interconnected computers and other devices that communicate and share resources. Networks allow data and information to be exchanged efficiently among connected devices.

Local Area Network (LAN)

A Local Area Network (LAN) connects computers and devices within a limited geographic area, such as a home, office, or building. LANs offer high data transfer speeds (ranging from 10 Mbps to 1 Gbps or higher), enabling fast

Read More

Essential Concepts in Computer Networking and Internet Security

1. Transmission Media Pathways

Transmission media refers to the physical or wireless pathways through which data travels from one device to another in a network. It plays a crucial role in determining the speed, quality, and reliability of communication. Transmission media is broadly classified into two types:

  • Guided Media: Includes physical cables like twisted pair, coaxial cable, and optical fiber, where signals travel through a fixed physical path. Optical fiber offers the highest bandwidth and
Read More

Spain’s Turning Point: Military, Political, and Social Upheaval of 1917

The Triple Crisis of 1917 in Spain

The serious difficulties facing the policy of the Restoration, combined with the problem of social unrest and military discontent, culminated in a general protest.

The Military Protest and the Juntas de Defensa

The Spanish army had an excessive number of officers. Tension was aggravated by the fact that promotions were made mostly by war merits. The strong discontent among lower and middle-ranking officers led to the formation of the Juntas de Defensa (Councils of

Read More

Essential Principles of Engineering Practice, Ethics, and Sustainability

Engineering Problem Solving Methodology

  1. Concepts

    Core theories, principles, laws, and assumptions guiding engineering thinking.

    Examples of Core Concepts:

    • Equilibrium laws
    • Conservation laws
    • Stress–strain relationships
    • Thermodynamic principles

    Use them to: Identify what applies to the problem, interpret results, and avoid incorrect assumptions.

  2. Compass

    A structured, repeatable approach to solving a problem. Functions like “mental GPS.”

    Typical Compass Steps:

    • Understand the problem statement.
    • Identify knowns
Read More

The Emotional Core of ‘Iris’: Vulnerability and Connection

A Personal Interpretation of the Song “Iris”

Dear John Rzeznik,

I hope you are doing well. I want to begin by expressing my sincere admiration for your music and the emotion you bring into your songs. I have listened to your work for many years, and it has always touched me in a deep and personal way. Your ability to express vulnerability, longing, and honesty is something I truly appreciate. I am writing this letter to share my personal interpretation of your song “Iris.” It has followed me through

Read More

Energy Classification and Natural Production Factors

Energy Classification and Resources

Energy can be classified as primary, secondary, or final energy resources. Primary energy or energy resources are those obtained directly from nature. These are categorized into renewable and non-renewable sources.

Primary Energy Sources

Renewable Energy

Renewable energy sources contain inexhaustible resources. However, they are often not directly applicable to production processes and must be transformed into secondary energy. Examples include:

  • Hydro
  • Solar
  • Wind
  • Biomass
  • Geothermal
  • Tidal

Non-

Read More

Mastering Business Model Development and Innovation

Developing an effective business model is a structured, iterative process that defines how an entrepreneurial venture will create, deliver, and capture value. This process goes beyond a simple product idea to map out the entire organizational and financial architecture.

The steps are best visualized using the Business Model Canvas (BMC), which divides the process into nine interconnected components that an entrepreneur must define, test, and align.

Customer-Centric Foundation

The first step focuses

Read More

Personal Wellness and Activity Tracking Analysis

Personal Wellness and Activity Tracking

Experience-wise, I have always had a moderately active background related to fitness and well-being, though not necessarily with consistent patterns. Usually, to stay fit and healthy, I mostly rely on taking regular walks, attending gym sessions, or maintaining overall movement throughout the day. Prior to embarking on this assignment related to monitoring my activity patterns for three weeks, my primary objectives were to enhance sleep patterns and stay regular

Read More