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, 22.06.2019 09:50
Assume that you have an sorted array of records. assume that the length of the array (n) is known. give two different methods to search for a specific value in this array. you can use english or pseudo-code for your algorithm. what is the time complexity for each algorithm and why?
Answers: 1
question
Computers and Technology, 22.06.2019 21:00
So im doing this school challenge and the teachers said whats the average text a student gets a day so i need to get about 20 in a day but dont know how can you guys 2163371293
Answers: 2
question
Computers and Technology, 23.06.2019 16:30
If i wanted to include a built-in calendar in a document, what option could i select? draw table insert table insert chart quick tables
Answers: 1
question
Computers and Technology, 24.06.2019 13:20
In the insert table dialog box, you select the checkbox to create the first row as the header of the table.
Answers: 3
You know the right answer?
Writing a Class

1. Fill in the blanks. (Note: The height of the triangle is longer than...
Questions
question
Engineering, 18.03.2021 02:00
question
Mathematics, 18.03.2021 02:00
question
Mathematics, 18.03.2021 02:00
question
Mathematics, 18.03.2021 02:00
Questions on the website: 13722361