well here i am just starting to do some coding about handphone to smartphone object..it's an inheritance project but not mine..;)
so i would like to share here about the errors and others.
any help is appreciated...
now my uml diagram i want to transfer to handwritten coding.so..

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();





}

can anyone explain what is string[N*] inbox; and image[N] mms_inbox;
what is the data type like?? why does it have a bracket?like [*] and [] the initial i suppose it's a pointer thing.

you are right in sayin that the:

> inbox string is a pointer[*N],

> the other [N] is the array element.

may I also mention this code is VERY MUCH incorrect, did yo write this? I would recommend ALOT of changes.

Edited 7 Years Ago by Unix*: n/a

sorry..
well i went to uncle google and saw
this is a mix of c# java and c++..
i only learnt c++ so need help here..
thanks for the response..
how to start?
well i did all according to the textbook..
the uml is stately given..my coding is always prone to errors...

Edited 7 Years Ago by MyRedz: n/a

may I ask.. who on earth wrote that? perhaps if you send me your "requirements" I can help =]

ok i fine...i will just post the requirements here..
but the project is a bit tricky to me...so i really need help..
for the first post smartphone and handphone is an inheritance..
for the descriptions

Description for class Handphone
1. Constructor initializes the phoneNumber (default value 012345), credit (default value 50) and sms_rate (default value 2.5). It also increment the object_counter each time an object is created.
2. smsEdit() allows us to edit sms text freely up to 160 characters. After completing edit, the composed sms can be stored in the phone memory as message before being sent to the recipient.
3. smsRead()reads received messages from the inbox.
4. Operator>>()allows us to send sms message to intended recipient.However, here we can only specify the recipient by the object name, rather than the phone number. (It can be done but quite complicated. You are welcome to challenge it for extra marks!)
5. getCredit() checks the balance of the credit.
6. getObjCounter()checks the number of existing object.
7. operator+() tops up the credit with specified amount.

Class Smartphone
1. operator>>() allows us to send mms (text image) message to intended recipient. However, here we can only specify the recipient by the object name, rather than the phone number. (It can be done but quite complicated. You are welcome to challenge it for extra marks!). Please create your own interesting and innovative text image.

|---------------------------
|<<<<<<<>>>>>>>
|-----------------------
|*** )| | (***
|** )| | (**
| * )| | (**

Fig. 3. Sample text image

2. mmsRead()displays mms message (text image)
3. mmsEdit()loads text image from file.

ok so you got the idea...
but i need for my coding from uml diagram correct so i can proceed to the descriptions..
any mistakes please correct it.

Edited 7 Years Ago by MyRedz: n/a

ok well im leaving work now as its 4.20pm my time, ill get looking at this tonight for you unless someone else gets there before me =]

Edited 7 Years Ago by Unix*: n/a

well here i am just starting to do some coding about handphone to smartphone object..it's an inheritance project but not mine..;)
so i would like to share here about the errors and others.
any help is appreciated...
now my uml diagram i want to transfer to handwritten coding.so..


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();





}

can anyone explain what is string[N*] inbox; and image[N] mms_inbox;
what is the data type like?? why does it have a bracket?like [*] and [] the initial i suppose it's a pointer thing.

hi>>the N* int he box is the number of sms that can be stored.
i think that * is just a symbol together wth N...erm..because it doesnt look like pointer

This article has been dead for over six months. Start a new discussion instead.