so what i am trying to do is write a program for a robotics project (think remote control using keyboard as input). To start I am writing this thing as a C++ console app.
Now I have taken a coarse on OOP so I have a decent knowledge of the syntax however my understanding of structure is very lacking (I would personnally blame the coarse for being a memorization session but blame wont get my anywere). while I could do this in C I mostly want to do this in C++ for education purposes.
Now, as far as the program goes I could and have in the past done this same thing very easily in C quite easily by simply have the program:
1) Collect user input
2) Perform the appropriate action,
3) waste some time with nested for loops or transmit signal, receive confirmation signal, stop transmitting.
4) and then check for user inputs again
with all of this in a while(1) things are somewhat easy.
however it would have inherent flaw that the program is tied up while waiting! (could this be solved via use of interrupts perhaps?)
would this be written as a lengthly driver with one class and one object, were the driver simply calls a bunch of functions:
right now it occured to me that i should make input the object and give it characteristics (like isActive, currentState, timeCollected etc)
is my interpretation that the input should be the object and there should be one class correct?
much thanks in advance