hi im a student in college and stuck with a programming teacher who really doesn't know how to teach. I need to make a 4 state machine (it doesn't really do anything beyond change states) but he didn't give us an example to work from. if someone could show me a simple one and walk me through it I would really appreciate it
Thanks for the help... NOT!!!!! This is my first c++ class jerk and I don't like stumbling around in the dark! If you ever feel like sharing from your obviously great knowledge (insert sarcastic quotation marks and tone here) feel free to comment again.
My personal experience is that even the nicest programmers can come off as being arrogant to beginners. Usually, this is because they're being extremely realistic, which is a developed personality attribute that is rewarded in a programming environment.
You mentioned that this is your first programming class. What knowledge do you have under your belt? Are there any other specific requirements to the four-state machine assignment? We'll be able to help you more effectively if we have an idea of where you are at.
If you want to be a programmer, you need to be able to take 1/2 ass instructions and be able to write code that performs the task, then be able to explain what it does to others. If you think everyone who gives you an assignment is going to tell you exactly how to do it, your diluding yourself.
Welcome to college, The real test is called a job.
Just a thought. If the instructions are too hard, maybe you should take the beginner class.
There was no beginner class this was the only one offered. I know he's not going to tell us how to do it, I don't expect him to. I would just like more information, an example of something that I have never seen before. I did just fine in my java class, the guy would walk us through the example program and then we would write a similar (but change the function and appearance) code and demonstrate it at the end of class. I understood it when we did that. This guy quotes from the book gives us technical definitions and expects to solve it from there. I'm just a little confused is all.
I'd recommend checking out how to enum a states variable and making a case structure around that.
if you make a states variable: enum states;
you can have a case structure:
and then have your states in each case block. When you receive an input that changes the state, you can change the state in the case blocks, and the state machine will change states about as quickly as I know how to make happen.