Re: Assignment in C++
On May 22, 3:59 pm, "Victor Bazarov" <v.Abaza...@comAcast.net> wrote:
g_sha...@yahoo.com wrote:
Hi Everyone I have a object oriented C++ assignment which is due this
week and I have no idea as to how start it.................
This program [..]
Any program should essentially start with a very simple thing:
int main()
{
return 0;
}
As soon as you get this to compile, continue expanding it until
it does what you need it to do.
That's usually about the last thing I'd do. Given the need to
write an application, you start with some design, identifying
the necessary abstractions. Only once you have an idea as to
what classes you need, and what they will look like, do you
start any coding. And in production code, at least, the coding
starts with the classes, and their unit tests; only once all of
the classes are available (and tested) to you think about
putting them together.
For a student project (or any project as small as this), you
very likely will skip the unit tests; the application is small
enough that you can debug the individual classes directly in it.
But coding without first knowing what you need to code is wrong
even in this case. (For a student project, I'd insist on full
UML diagrams, on paper, before starting coding, although for
something this small, an experienced practitionner could
probable do them in his head.)
Of course, if he doesn't yet know how to invoke the compiler, I
would start with hello, world, to learn this.
--
James Kanze (GABI Software) email:james.kanze@gmail.com
Conseils en informatique orient=E9e objet/
Beratung in objektorientierter Datenverarbeitung
9 place S=E9mard, 78210 St.-Cyr-l'=C9cole, France, +33 (0)1 30 23 00 34