1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
iris [78.8K]
2 years ago
11

Ok for whoever answers this, Ill wager 20 points...

Computers and Technology
2 answers:
Novosadov [1.4K]2 years ago
8 0

Answer:

The display will be 17.

Explanation:

Tracing through the program:

At first, math is called and sent 1 and 2 - so 1 is stored to ans1 and 2 is stored to ans2.

If the user inputs 3 for a and 4 for b, the program then calls function math2 and passed values of 3 and 4.

So now inside of math2, 3 is stored to res1 and 4 is stored to res3. Inside of this function, res1 and res2 are added together - so then 7 is stored to d and then returned back to the original function.

So now 7 was stored back to the variable c. Then a and ans1 are added together (3 + 1 = 4) and b and ans2 are added together (4 + 2 = 6). Each of these values are stored back to e and f.

Then those values, e and f (4 and 6) are again sent to math2, which simply adds the values together and returns it back to the function. So 10 is sent back to math and stored to the value of g.

Then c (7) and g (10) are added together and displayed.

Temka [501]2 years ago
6 0

Answer:

The display will be 17.

Explanation:

You might be interested in
Compare and contrast the TwoFish encryption algorithm with the DES and AES algorithms. In your comparison be sure to compare and
zheka24 [161]

Answer:

The comparison is done based on their basic, principle, plaintext, key size, rounds, rounds name, security and speed. See the attached document.

Explanation:

The the attachment

8 0
3 years ago
Where in an email would u find information about the action requirements​
Assoli18 [71]

Answer:When trying to find the action that you need to do in an e-mail, it is best to consult the body of the email, also known as (B) in the message.. The message would detail the tasks that you need to tackle, which are generally not detailed in the subject line, greeting, and you will most definitely not find in the to field.

Explanation:

3 0
2 years ago
Write a test program that creates two Rectangle objects—one with width 4 and height 40 and the other with width 3.5 and height 3
BARSIC [14]

Answer:

public class Rectangle {

   private double width;

   private double heigth;

   public Rectangle(double width, double heigth) {

       this.width = width;

       this.heigth = heigth;

   }

   public double getWidth() {

       return width;

   }

   public void setWidth(double width) {

       this.width = width;

   }

   public double getHeigth() {

       return heigth;

   }

   public void setHeigth(double heigth) {

       this.heigth = heigth;

   }

   public double perimeter(double width, double heigth){

       double peri = 2*(width+heigth);

       return peri;

   }

   public double area(double width, double heigth){

       double area = width*heigth;

       return  area;

   }

}

class RectangleTest{

   public static void main(String[] args) {

       //Creating two Rectangle objects

       Rectangle rectangle1 = new Rectangle(4,40);

       Rectangle rectangle2 = new Rectangle(3.5, 35.7);

       //Calling methods on the first Rectangel objects

       System.out.println("The Height of Rectangle 1 is: "+rectangle1.getHeigth());

       System.out.println("The Width of Rectangle 1 is: "+rectangle1.getWidth());

       System.out.println("The Perimeter of Rectangle 1 is: "+rectangle1.perimeter(4,40));

       System.out.println("The Area of Rectangle 1 is: "+rectangle1.area(4,40));

       // Second Rectangle object

       System.out.println("The Height of Rectangle 2 is: "+rectangle2.getHeigth());

       System.out.println("The Width of Rectangle 2 is: "+rectangle2.getWidth());

       System.out.println("The Perimeter of Rectangle 2 is: "+rectangle2.perimeter(4,40));

       System.out.println("The Area of Rectangle 2 is: "+rectangle2.area(4,40));

   }

}

Explanation:

  • Firstly A Rectangle class is created with two fields for width and heigth, a constructor and getters and setters the class also has methods for finding area and perimeters
  • Then a RectangleTest class containing a main method is created and two Rectangle objects are created (Follow teh comments in the code)
  • Methods to get height, width, area and perimeter are called on each rectangle object to print the appropriate value
5 0
2 years ago
If you have two tasks x and y, with y being a successor to x, if we mark x as undone (because it needs to be redone for some rea
Ierofanga [76]

Answer:

idk

Explanation:

sorry

7 0
2 years ago
The BaseballPlayer class stores the number of hits and the number of at-bats a player has. You will complete this class by writi
Rzqust [24]

Answer:

Answered below

Explanation:

Class BaseballPlayer{

//Instance variables

string name;

int hits;

int bats;

//Constructor

BaseballPlayer (string a, int b, int c){

name = a;

hits = b;

bats = c

}

public void printBattingDetails( ){

System.out.print(name, hits, bats)

}

}

//Demo class

Class BaseballTester{

public static void main (String args []){

BaseballPlayer player = new BaseballPlayer("Joe", 8, 4)

player.printBattingDetails( )

}

}

8 0
2 years ago
Other questions:
  • Which of the following payment types require you to pay upfront A. Money order and credit card B. Money orders and prepaid card
    9·2 answers
  • The code segmentif (speed <= 40)cout << "Too slow";if (speed > 40 && speed <= 55)cout << "Good spee
    11·1 answer
  • Which evaluation factor will be most important when choosing technology for the company
    5·1 answer
  • Who is the founder of javascript? ​
    14·2 answers
  • 2
    11·1 answer
  • The 8-bit ____ field is used by source network hosts and forwarding routers to distinguished classes or priorities in ipv6 packe
    11·1 answer
  • Which of the following might an interior designer in the retail industry specialize in?
    9·1 answer
  • Universal Containers uses a custom object within the product development team. Product development, executives, and System Admin
    11·1 answer
  • 7.4 Lesson Practice (projectstem): what is output if the user is enters 2?​
    8·1 answer
  • What is a good theme statement for the short Pixar film "bao"?
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!