Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

in DrJava public class MathFun { // Insert all code by adding a line IMMEDIATELY below the comment describing what to do 7/Declare two integers,

in DrJava image text in transcribed
image text in transcribed
public class MathFun { // Insert all code by adding a line IMMEDIATELY below the comment describing what to do 7/Declare two integers, a and b public void init() { //Put the value 2 into variable a 1/Put the value 7 into variable b public void results() { //Declare an integer called sum 1/Declare an integer called diff 7/Declare an integer called remain //set sum as the sum of a and b 1/set diff as 6 subtracted by two times a //set remain as the remainder of b divided by 3 public void newResults() { 1/Declare an integer called twice 1/Declare a decimal variable called ratio /et twice to twice the sum of a and b //set ratio to the value of twice divided by b. Make sure the answer is a decimal value public statie void main(string] args) { Mathrun test - new Mathrun(); test.init() test.results(); tent.newResults() Load MathFunjava into Drjava. Write the Java code requested in the comments. Compile the code and remove any errors. Attach and submit your completed MathFun.java file

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

The Structure Of The Relational Database Model

Authors: Jan Paredaens ,Paul De Bra ,Marc Gyssens ,Dirk Van Gucht

1st Edition

3642699588, 978-3642699580

More Books

Students also viewed these Databases questions