Quote (CPK001 @ Oct 4 2017 04:37am)
To help you think about how to program, the key concept is to think 'logically'. It is a step by step process. Once you have mastered this concept then you will be a great programmer.
So you have to create a program that: 1) Displays Accepts user inputs, 2) calculates the area of a shape and 3) Displays the results.
So first thing you would do is:
Write the code that asks for user input and -
Write the code that prints the text to the screen asking for user input.
You are also told to define constant PI and make PI = 3.14159;
So now you have a baseline, the code at this point prompts for user input and displays the text on the screen.
You are now told to have if/else statements based on the 4 different options.
so if user presses 1 then the code will print 'Area of the square: ' then prompt for user input.
Then to find area of the square you would go var = var * var and print 'Area = ' + var.
Once you have this completed for the first option then the rest of the options should be easy enough.
Now I personally haven't done C++, I instead did OOP but the concept of programming is the same nonetheless.
Just learn to think logically and step by step. If you can explain in plain English what you want the code to do then you can create a program that will do that exact thing.
Hope this helps.
I've only ever taken 1 class on some very basic program, I think mit app inventor, and the way you just laid that out finally made that class click for me. Good post imo
It now seems like if you were teaching a child something new.. you have to literally approach it as a blank slate and instruct them to do all the menial common sense stuff.