Skip to content

Instantly share code, notes, and snippets.

View qswses123's full-sized avatar

qswses123

  • Joined Sep 28, 2025
View GitHub Profile
@qswses123
qswses123 / CupcakeMachine.java
Created October 5, 2025 07:03
CupcakeMachine
public class CupcakeMachine {
// Instance variables - each machine gets its own set
private int numCupcakes;
private double costPerCupcake;
private int orderNumber;
/**
* Constructs a new CupcakeMachine.
* @param initialCupcakes The number of cupcakes the machine is stocked with[cite: 7].
* @param cost The cost per cupcake[cite: 9].
@qswses123
qswses123 / GameCharacter.java
Last active September 28, 2025 07:21
AP_CSA_Class&Object
/** https://g.co/gemini/share/aa6d78a428cf
* 게임 캐릭터를 표현하는 클래스입니다.
* 이 클래스는 다양한 형태의 메서드를 통해 객체의 행동을 정의합니다.
*/
public class GameCharacter {
// --- 1. 인스턴스 변수 (Instance Variables) ---
// 캐릭터의 핵심 데이터. private으로 외부의 직접적인 수정을 막습니다.
private String name;
private int hp;