Hi there,
Im studying computer science I have a project due tomorrow and I cant decide how to design it (using c#):
The project is fairly basic - I have a car and I am guiding it through a city. Basically the program takes a numbe of inputs via the console the first set of inputs determines the boundary of the driveable area (so you cant drive into the river), the second determines where to start at the direction you are facing (e.g x,y,North) and the last the directions which is a string of chars (e.g. LLFFRRFFFLFRM) where l means turn left, r means turn right and f means go forward.
Ive gone about and created a Car class and used the main class to control it.
What I cant figure out is should I check each char in the directoin string before passing it to the car class or should that be the responsibility of the car class.
And should the main class also make sure that the car does not go out of bounds or is that the responsibility of the car class as well.
How would you go about it and why?
Thanks in advance.