Java class

What am i missing my code is not wrong but this in not what i want it to do. This is what my professor wants me to do. Finally, add a static void printResult method that takes userInt1, userInt2, result and systemOperator as arguments and prints out the result. Hint: copy down the System.printf line and comment it out in the main program. All this does is print the result out in a method. IM MAKING AND CALCULATOR BTW.
No description
No description
6 Replies
JavaBot
JavaBot2mo ago
This post has been reserved for your question.
Hey @Carnage! Please use /close or the Close Post button above when your problem is solved. Please remember to follow the help guidelines. This post will be automatically marked as dormant after 300 minutes of inactivity.
TIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here.
Carnage
CarnageOP2mo ago
No description
bassus
bassus2mo ago
You never call the printResult in your main:Huh: I will never get, why teachers focus on teaching commandline with Java or viceversa
Kyo-chan
Kyo-chan2mo ago
Beginners have a hard time figuring out the point of a program that already contains its parameters without letting the user input parameters. And if they do it as command arguments, first that means having to teach arrays before you cover other basics, second beginners will think this way to program can't fix user input errors.
bassus
bassus2mo ago
Hmmm, i don't see why you shouldn't just do it like this: 1. Look these are basics of imperative programming 2. Look this a class and this an object 3. Simple 3 Layer Architectures and you get the User Input through a simple Swing GUI^^ I myself never used the commandline till i started C and turned out relatively fine🤷‍♂️
JavaBot
JavaBot2mo ago
💤 Post marked as dormant
This post has been inactive for over 300 minutes, thus, it has been archived. If your question was not answered yet, feel free to re-open this post or create a new one. In case your post is not getting any attention, you can try to use /help ping. Warning: abusing this will result in moderative actions taken against you.

Did you find this page helpful?