subject

Writing a Class

1. Fill in the blanks. (Note: The height of the triangle is longer than the base)

{ public class Triangle
int base;
int height;

public Triangle( )
{
= 5; =10;
}

public Triangle(int b, int h )
{
= ;
= ;
}

public getBase( )
{

;
}

public setBase( )
{

= ;
}

}

2. Fill in the blanks.

public class triangleDriver
{ public static main(String args[])
{
triangle1 = Triangle( );
System. out. println(“The triangle’s height is” + . );
}
}

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 20:50
What does operator overloading allow you to do?
Answers: 2
question
Computers and Technology, 22.06.2019 11:10
Which are not examples of chronic or persistent stress? moving
Answers: 1
question
Computers and Technology, 23.06.2019 14:00
How are stop motion special effects in animated films created
Answers: 1
question
Computers and Technology, 23.06.2019 15:00
1. which of the following statements are true about routers and routing on the internet. choose two answers. a. protocols ensure that a single path between two computers is established before sending packets over it. b. routers are hierarchical and the "root" router is responsible for communicating to sub-routers the best paths for them to route internet traffic. c. a packet traveling between two computers on the internet may be rerouted many times along the way or even lost or "dropped". d. routers act independently and route packets as they see fit.
Answers: 2
You know the right answer?
Writing a Class

1. Fill in the blanks. (Note: The height of the triangle is longer than...
Questions
question
Mathematics, 19.03.2020 21:38
question
History, 19.03.2020 21:38
question
Social Studies, 19.03.2020 21:38
Questions on the website: 13722362