Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

need to write the java code requested in the comments. public class MathFun { //Insert all code by adding a line IMMEDIATELY below the comment

need to write the java code requested in the comments. image text in transcribed
public class MathFun { //Insert all code by adding a line IMMEDIATELY below the comment describing what to do //Declare two integers, a and b public void init() { //Put the value 3 into variable a //Put the value 5 into variable b public void results() { //Declare an integer called sum //Declare an integer called prod //Declare an integer called diff //Declare an integer called remain //set sum as the sum of a and b //set prod as the product of a and b //set diff as b subtracted by a //set remain as the remainder of b divided by 2 public void newResults() { //Declare an integer called twice //Declare a decimal variable called ave //Declare an integer called whoa //set twice to a doubled //set ave to the average of a and b. //set whoa to ten times a plus b Make sure the answer is a decimal value public static void main(String[] args) { //this.init(); //this.results(); //this.newResults ()

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

MySQL/PHP Database Applications

Authors: Brad Bulger, Jay Greenspan, David Wall

2nd Edition

0764549634, 9780764549632

More Books

Students also viewed these Databases questions

Question

6. Use short-range goals to assist in achieving long-range goals.

Answered: 1 week ago

Question

List behaviors to improve effective leadership in meetings

Answered: 1 week ago