No edit summary Tag: 2017 source edit |
m (Reverted edits by Stephanie@mdriven.net (talk) to last revision by Emelie Into) Tags: Rollback Reverted |
||
Line 1: | Line 1: | ||
You can change what Package a class belongs to. '''[[ | You can change what Package a class belongs to. '''[[MDrivenStart Package|Need to add a package]]'''? | ||
It is good practice to write an explanation | It is good practice to write an explanation on the background information for this class in the code comment. It will help you remember for what purpose you created it. | ||
The class is often given a ''default string representation'' that can be any expression - typically one of its own attributes of type string. '''[[ | The class is often given a ''default string representation'' that can be any expression - typically one of its own attributes of type string. '''[[MDrivenStart Attributes|Need to add an attribute]]'''? | ||
The default string representation is used when a UI tries to display an object of your class without any information about what | The default string representation is used when a UI tries to display an object of your class without any information about what attribute to show | ||
A class that acts as a ''superclass'' for another class is often marked as abstract to indicate that it should not be used directly | A class that acts as a ''superclass'' for another class is often marked as abstract to indicate that it should not be used directly - this will prohibit creation of objects. You can read [[UML Inheritance|more on inheritance in uml]] here. | ||
Classes most often | Classes most often has '''[[MDrivenStart Associations|associations to other classes]]'''. | ||
Objects of classes are normally ''persistent'' (they are saved and shared between sessions) but can be made ''transient'' (they are short | Objects of classes are normally ''persistent'' (they are saved and shared between sessions) but can be made ''transient'' (they are short lived in the memory of the current session) | ||
{{Template:MDrivenStart_Template}} | {{Template:MDrivenStart_Template}} | ||
Revision as of 12:07, 31 January 2025
You can change what Package a class belongs to. Need to add a package?
It is good practice to write an explanation on the background information for this class in the code comment. It will help you remember for what purpose you created it.
The class is often given a default string representation that can be any expression - typically one of its own attributes of type string. Need to add an attribute?
The default string representation is used when a UI tries to display an object of your class without any information about what attribute to show
A class that acts as a superclass for another class is often marked as abstract to indicate that it should not be used directly - this will prohibit creation of objects. You can read more on inheritance in uml here.
Classes most often has associations to other classes.
Objects of classes are normally persistent (they are saved and shared between sessions) but can be made transient (they are short lived in the memory of the current session)