subject

When running javaapplication8, the following output is seen on the display: addition(2,3) = 5 javaapplication. java is given below with some missing parts in the circuit class and printcircuit method (missing parts are identified by dots): class circuit{ private string operation; private int number1, number2, output; public circuit(int n1, int n2){ …} public void setnumbers(int n1, int n2){ …} public void setoperation(…){operation=op; } public void setn1(int n){number1 = n; } public void setn2(int n){number2 = n; } public void setoutput(int n){… = n; } public … getoperation(){return operation; } public … getn1(){return number1; } public int getn2(){…} public int getoutput(){return output; } } public class javaapplication8 { private static void printcircuit(circuit a) { … } public static void main(string[] args) { circuit a1 = new circuit(2,3); a1.setoperation("addition"); a1.setoutput(a1.getn1()+a1.; printcircuit(a1); } } 1. fill in all missing parts 2. modify the main() method so that the output becomes: subtraction(2,3) = -1

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 19:40
Write the quartstogallons java class that declares a named constant to hold the number of quarts in a gallon (4). also declare a variable to represent the number of quarts needed for a painting job, and assign an appropriate value—for example, 18. compute and display the number of gallons and quarts needed for the job. display explanatory text with the values, for example:
Answers: 2
question
Computers and Technology, 22.06.2019 19:30
When creating a presentation in libre office impress, where does the editing of slides take place?
Answers: 1
question
Computers and Technology, 23.06.2019 06:30
Which option correctly describes a dbms application? a. software used to manage databases b. software used to organize files and folders c. software used to develop specialized images d. software used to create effective presentations
Answers: 1
question
Computers and Technology, 23.06.2019 12:30
What is the difference between the internet and the world wide web?
Answers: 1
You know the right answer?
When running javaapplication8, the following output is seen on the display: addition(2,3) = 5 javaa...
Questions
question
Biology, 08.04.2021 23:50
Questions on the website: 13722363