Desperate help on Object-oriented programming (turbo pascal) 
Author Message
 Desperate help on Object-oriented programming (turbo pascal)

Object-oriented programming (turbo Pascal)

CAN YOU PLEASE GIVE ME SOME POINTERS ON HOW TO CODE THE FOLLOWING: (I HAVE
TRIED MANY TIMES (NEW LEARNING AT PASCAL)

A motorway toll system operates as follows:

a private car passing through the toll is charged 1, and all other motor
vehicles are charged 5.  At the start of the day, the toll system's opening
balance is initialised, and then an unknown number of vehicles are processed
during the course of the day.  At any stage during the day, the toll system can
be asked to display the current balance or the number of different vehicles
(cars and non-cars) processed.  The system automatically displays the closing
balance at the end of the day, and also the total number of vehicles processed.
 The toll system is based on the principles of a bank account, which can

(a) accept an amount  
(b) process a withdrawal
(c) maintain a current balance, and
(d) issue a current balance on demand.  

 Write a menu-driven application (using Object Orientation techniques) for the
above specification, in which a Toll class (tTollClass) is declared as a
descendant of an Account class (tAccountClass). The application should:
initialise a Toll object (an instance of class tTollClass),
process n vehicles (thus simulating a day's activity) until the user decides to
quit,
display the data (as in the specification) and close.

(Note that it would also be possible to declare a class tMenuClass, which
handles all menu activities, such as displaying a menu, displaying a prompt,
and getting a user key-press.  Optionally, therefore, write a unit MenuApp, in
which this class and its properties and methods are defined, and incorporate
this unit into your application).



Sat, 16 Apr 2005 02:05:23 GMT  
 Desperate help on Object-oriented programming (turbo pascal)

Quote:

> Object-oriented programming (turbo pascal)

> CAN YOU PLEASE GIVE ME SOME POINTERS ON HOW TO CODE THE FOLLOWING: (I HAVE
> TRIED MANY TIMES (NEW LEARNING AT PASCAL)

Ask your teacher.


Sat, 16 Apr 2005 04:07:10 GMT  
 Desperate help on Object-oriented programming (turbo pascal)
HaqueF6 schrieb:

Quote:
> Object-oriented programming (turbo pascal)

> CAN YOU PLEASE GIVE ME SOME POINTERS ON HOW TO CODE THE FOLLOWING: (I HAVE
> TRIED MANY TIMES (NEW LEARNING AT PASCAL)

Why not post your existing code here so that we can spot your problems?
We don't do homework of students or school here from scratch. What we do
is to help with detailed problems when there is already some code.
Otherwise you WON'T LEARN ANYTHING, and PLEASE stop writing all
uppercase, that's considered as shouting - which is VERY unpolite here.

Greetings

Markus



Sat, 16 Apr 2005 04:40:02 GMT  
 Desperate help on Object-oriented programming (turbo pascal)
Quote:

> > Object-oriented programming (turbo pascal)

> > CAN YOU PLEASE GIVE ME SOME POINTERS ON HOW TO CODE THE FOLLOWING:
(I HAVE
> > TRIED MANY TIMES (NEW LEARNING AT PASCAL)

> Why not post your existing code here so that we can spot your
problems?
> We don't do homework of students or school here from scratch. What
we do
> is to help with detailed problems when there is already some code.
> Otherwise you WON'T LEARN ANYTHING, and PLEASE stop writing all
> uppercase, that's considered as shouting - which is VERY unpolite

here.

It's quite funny how the same sort of problem goes around. I had to do
the same sort of problem in C++ which I considered much tricker to do
than in Turbo Pascal.

However I agree with you, that those sorts of problems should not just
be resolved without no understanding of it, yet I consider that some
schools (or teachers) go to the trouble of checking for these sorts of
activitys going on (in most events it's really asking for trouble when
you use their networks & systems cause they can track it down more
easily, believe it or not) & the penalty is just as good as not
handing in anything!

However it is also my view that something as silly as this project
would be, you would be greater off taking the time of resourcing that
the program may use & find better examples of Pascal programming into
writing your own masterpiece rather than working out which cars get
the discount (that sounds like the sort of thing some programmer would
have written for the M1 Motorway!). However methinks I would be the
only person to avoid such boring programming (but in theory you would
have a better understanding if you were writing something good not
this dribble they hand out).

Regards,
Ross.



Sat, 16 Apr 2005 10:38:43 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. serialun.zip Turbo Pascal Object Oriented Serial Port Unit

2. Object Oriented Programming Tutorials

3. object oriented programming and its use

4. Object Oriented Programming Tutorials

5. Object oriented programming

6. Books about Object Oriented Programming in BP7.

7. OOP - books about object oriented programming in BP7.

8. The object-oriented tool for EVERY Pascal programmer.

9. eflibpt5.zip Object-oriented framework for Pascal programmers

10. Free object-oriented toolkit for Borland Pascal

11. Free object-oriented toolkit for Borland Pascal

12. Object-programming in Turbo Pascal

 

 
Powered by phpBB® Forum Software