Click here to Skip to main content
15,886,919 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
GeneralRe: OOP and the scope of a class, am I wrong? Pin
honey the codewitch6-Nov-23 22:20
mvahoney the codewitch6-Nov-23 22:20 
GeneralRe: OOP and the scope of a class, am I wrong? Pin
Mark Quennell6-Nov-23 22:58
Mark Quennell6-Nov-23 22:58 
GeneralRe: OOP and the scope of a class, am I wrong? Pin
DT Bullock7-Nov-23 1:13
DT Bullock7-Nov-23 1:13 
GeneralRe: OOP and the scope of a class, am I wrong? Pin
jschell7-Nov-23 5:55
jschell7-Nov-23 5:55 
GeneralRe: OOP and the scope of a class, am I wrong? Pin
JeffL457-Nov-23 1:38
JeffL457-Nov-23 1:38 
GeneralRe: OOP and the scope of a class, am I wrong? Pin
MikeCO107-Nov-23 1:49
MikeCO107-Nov-23 1:49 
GeneralRe: OOP and the scope of a class, am I wrong? Pin
BryanFazekas7-Nov-23 2:05
BryanFazekas7-Nov-23 2:05 
GeneralRe: OOP and the scope of a class, am I wrong? Pin
Daniel Anderson 20217-Nov-23 2:46
Daniel Anderson 20217-Nov-23 2:46 
I`d say no you are not wrong, but the teacher is not necessarily wrong either.

A class can be almost anything in C++.
- Can be an interface
- Can be a functor
- Can be just data
- Whatever...

so, depending on how the teacher wants the thing to evolve he might direct his students.
with very little or no context it is hard to decide who's right.

If you are using class to model things, they can be names.
If they model actions, they can be verbs.
If they model attributes, they can be adjectives.

classes are one of the mechanisms for encapsulation & data hiding after that, when I do code review, I usually check the coupling between the class and the client, this usually tells me if the data hiding or encapsulation is at a proper level or done right.
GeneralRe: OOP and the scope of a class, am I wrong? Pin
jschell7-Nov-23 5:58
jschell7-Nov-23 5:58 
GeneralRe: OOP and the scope of a class, am I wrong? Pin
Dave B 687-Nov-23 3:37
Dave B 687-Nov-23 3:37 
GeneralRe: OOP and the scope of a class, am I wrong? Pin
jochance7-Nov-23 3:30
jochance7-Nov-23 3:30 
GeneralRe: OOP and the scope of a class, am I wrong? Pin
honey the codewitch7-Nov-23 4:10
mvahoney the codewitch7-Nov-23 4:10 
GeneralRe: OOP and the scope of a class, am I wrong? Pin
jochance7-Nov-23 4:19
jochance7-Nov-23 4:19 
GeneralRe: OOP and the scope of a class, am I wrong? Pin
honey the codewitch7-Nov-23 4:38
mvahoney the codewitch7-Nov-23 4:38 
GeneralRe: OOP and the scope of a class, am I wrong? Pin
jschell7-Nov-23 6:03
jschell7-Nov-23 6:03 
GeneralRe: OOP and the scope of a class, am I wrong? Pin
Dan Sutton7-Nov-23 3:30
Dan Sutton7-Nov-23 3:30 
GeneralRe: OOP and the scope of a class, am I wrong? Pin
Andreas Mertens7-Nov-23 4:57
professionalAndreas Mertens7-Nov-23 4:57 
GeneralRe: OOP and the scope of a class, am I wrong? Pin
klinkenbecker7-Nov-23 3:37
klinkenbecker7-Nov-23 3:37 
GeneralRe: OOP and the scope of a class, am I wrong? Pin
Steve Naidamast7-Nov-23 4:18
professionalSteve Naidamast7-Nov-23 4:18 
GeneralRe: OOP and the scope of a class, am I wrong? Pin
megaadam7-Nov-23 4:35
professionalmegaadam7-Nov-23 4:35 
GeneralRe: OOP and the scope of a class, am I wrong? Pin
honey the codewitch7-Nov-23 4:36
mvahoney the codewitch7-Nov-23 4:36 
GeneralRe: OOP and the scope of a class, am I wrong? Pin
MSBassSinger7-Nov-23 4:53
professionalMSBassSinger7-Nov-23 4:53 
GeneralRe: OOP and the scope of a class, am I wrong? Pin
StatementTerminator7-Nov-23 5:04
StatementTerminator7-Nov-23 5:04 
GeneralRe: OOP and the scope of a class, am I wrong? Pin
honey the codewitch7-Nov-23 5:22
mvahoney the codewitch7-Nov-23 5:22 
GeneralRe: OOP and the scope of a class, am I wrong? Pin
Tiger125067-Nov-23 7:43
Tiger125067-Nov-23 7:43 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.