hi all.
i am just starting doing this idea of inheritance handphones of oop c++..
but this uml diagram below got some weird symbols like
inbox:string[N*]
mms_inbox:image[N]
what is it?
it sure is not c++..
any guide help to my questions..
below the uml is my handwritten coding from uml to brief c++...
is my coding ok?
can it be compilable?
even i have my doubts looking at how weird the uml is...
Quote:
Handphone
-phoneNumber:string
-message: string
-credit:double
-sms_rate:double
-inbox:string[N*]
-object_counter:int
+<<constructor>> Handphone(no:string, cr:double, rate:double)
+smsEdit():void
+smsRead():void
+operator>>(recipient:Handphone&):void
+getCredit():double
+getObjCounter():int
+operator+(topUp:double): Handphone
Smartphone
-mms_message:image
-mms_inbox:image[N]
+operator>>(:Smartphone):void
+mmsRead():void
+mmsEdit():void
Fig. 2 Detail UML diagrams
here's my work...any comments ideas or something..i think it's ok..
-
class Handphone
-
{
-
private:
-
-
string phoneNumber;
-
string message;
-
-
double credit;
-
-
string[N*] inbox;
-
-
int object counter;
-
-
-
-
public:
-
-
Handphone ( string no, double cr,double rate)
-
-
void smsEdit();
-
-
void smsRead();
-
-
-
}
-
-
-
Class Smartphone : public Handphone
-
{
-
private:
-
-
image mms_message;
-
image[N] mms_inbox;
-
public:
-
-
void operator>>(Smartphone &s);
-
-
void mmsRead();
-
-
void mmsEdit();
-
-
-
-
-
-
}