이전 재구성 작업에서 Dev/ 폴더가 누락되었던 것을 반영.
- Dev/Topic_Programming(중첩 폴더, 78개)은 Dev 자체 최상위 폴더들
(Architecture/Conventions/Engineering_Intelligence 등)과 완전 중복이라 제거.
- Dev 최상위 엔지니어링 지식 폴더(Architecture/Conventions/Engineering_Intelligence/
Failure_Library/Generalized_Principles/Language/Pattern_Catalog/Platform_Guides/
Subsystems, 77개)는 이미 Topic_Programming/Topic_Programming에 더 최신 버전이
존재해 중복 제거(고유 콘텐츠 1개는 예외 처리하여 이동 보존).
- Dev의 W3Schools 언어 튜토리얼 폴더(Topic_C/CPP/CSS/CSharp/HOWTO/HTML/Java/
JavaScript/PHP/Python/SQL/W3CSS, 1201개)는 전부 Topic_Programming 하위로 이동.
- 에이전트 운영 상태(.astra/docs)는 그대로 유지, 콘텐츠 폴더만 정리.
- Topic_Programming 최종 문서 수: 2784 → 3985.
This chapter directly answers a question it poses itself — "why public, not static, like in the Methods chapter?" — with a crisp rule: static methods belong to the CLASS and need no object, while public methods belong to OBJECTS and can only be called through an instance; this reframes everything the Methods section taught (static void MyMethod()) as having been INCOMPLETE for real OOP use, since every method there was callable without ever creating an object — a limitation this chapter's Car/fullThrottle() example exists specifically to break. [S1]
🧠 핵심 개념 (Core concepts)
Class members — fields and methods declared inside a class, collectively. [S1]
Fields — variables inside a class; accessed via an object using dot syntax (myObj.color), can be assigned a default value inline or left blank and set later via the object. [S1]
static vs. public methods — static methods are callable WITHOUT creating an object (belong to the class); public methods require an object instance to call (belong to objects) — this is why object methods use public, not static. [S1]
Method access via dot syntax — myObj.fullThrottle();, same pattern as field access. [S1]
Multiple objects, independent field values — creating several objects of the same class (Car Ford, Car Opel) gives each its own independent copy of the fields. [S1]
Multiple classes for organization — one class (e.g. Car) holds fields/methods, another (e.g. Program) holds Main() and does the work; recommended practice. [S1]
public as access modifier — when fields need to be accessible from ANOTHER class (like Program accessing Car's fields), those fields must be marked public; deferred full coverage to a later Access Modifiers chapter. [S1]
📖 세부 내용 (Details)
Field-only access: class Car { string color = "red"; int maxSpeed = 200; static void Main(string[] args) { Car myObj = new Car(); Console.WriteLine(myObj.color); Console.WriteLine(myObj.maxSpeed); } }. [S1]
Blank fields set via object: string color; int maxSpeed; ... myObj.color = "red"; myObj.maxSpeed = 200;. [S1]
Multiple independent objects: Car Ford = new Car(); Ford.model = "Mustang"; ... Car Opel = new Car(); Opel.model = "Astra"; ... — each object's fields are independent. [S1]
Object method call requiring public: public void fullThrottle() { Console.WriteLine("The car is going as fast as it can!"); } ... myObj.fullThrottle();. [S1]
Cross-class access with public fields: a Car class in one file exposes public string model; etc., and a separate Program class's Main() creates/uses Car objects. [S1]
⚖️ 모순 및 업데이트 (Contradictions & updates)
Methods 챕터의 static이 실제로는 제약이었음이 드러남: Methods 챕터에서 배운 static void MyMethod()는 객체 생성 없이 클래스명만으로 호출 가능한 방식이었는데, 이번 챕터는 이것이 진짜 OOP의 "객체 메서드"와는 다른 것이며, 객체를 통해 호출하는 메서드는 반드시 public(static이 아님)이어야 한다는 점을 명확히 함 — Methods 챕터의 모든 예제가 사실 객체 없이도 동작하는 방식이었다는 한계가 이번 챕터에서 드러남. [S1]
🛠️ 적용 사례 (Applied in summary)
Ford와 Opel 두 Car 객체를 만들어 각각 다른 model/color/year 값을 독립적으로 저장하고, fullThrottle() 메서드를 public으로 선언해 객체를 통해 호출하는 예제가 원문에서 직접 실전 활용 사례로 제시됨. [S1]
💻 코드 패턴 (Code patterns)
static (class-level, no object needed) vs. public (object-level, requires an instance) methods (C#):
classCar{publicstringmodel;publicvoidfullThrottle()// public -- called through an object{Console.WriteLine("The car is going as fast as it can!");}}classProgram{staticvoidMain(string[]args)// static -- belongs to the class itself{CarmyObj=newCar();myObj.fullThrottle();// requires the object instance}}
✅ 검증 상태 및 신뢰도
상태: draft
검증 단계: conceptual
출처 신뢰도: B (W3Schools — widely used educational reference, not a primary standards body)