Welcome! Log In Create A New Profile

Advanced

assignment2 semester2

Announcements Last Post
Announcement SoC Curricula 09/30/2017 01:08PM
Announcement Demarcation or scoping of examinations and assessment 02/13/2017 07:59AM
Announcement School of Computing Short Learning Programmes 11/24/2014 08:37AM
Announcement Unisa contact information 07/28/2011 01:28PM
assignment2 semester2
August 23, 2010 07:49PM
dear friends, does anyone have some guidance they can share with me on assignment 2? I am unsure of exactly what needs to be done for both questions.
Re: assignment2 semester2
August 24, 2010 02:32PM
Hi Guys, quick question. Do we need to submit Part B for Assignment 02 of COS2144?
Re: assignment2 semester2
August 24, 2010 03:06PM
Nope, not part B, good for our revision though.
Have you made any progress on Part A? Can you please guide if you have?
Re: assignment2 semester2
August 30, 2010 11:19AM
Hey guys, I'm having some trouble making use of the container in AccountList. QList<Account*>, how do i add my account to it once its been created?

_______________________________________
Don't be different...be the one making a difference
avatar Re: assignment2 semester2
August 30, 2010 12:29PM
Language: C++ (QT)
AccountList<Account*> list; /* Setup a new Account object called account, for example. Account *account = new Account(); */ list << account;
avatar Re: assignment2 semester2
August 30, 2010 12:32PM
Hmmm, why would you want to have a list of pointers?

Why not just have a list of static objects and then add a copy constructor and an assignment operator overload?

Language: C++ (QT)
class Account { public: Account(); // default constructor Account(Account const &other); // copy constructor Account &operator=(Account const &other); // assignment operator overload   // ...   };
Re: assignment2 semester2
August 30, 2010 01:10PM
I guess that would be beter, but we must use pointers.

_______________________________________
Don't be different...be the one making a difference
Sorry, only registered users may post in this forum.

Click here to login