[solved] – Question 95965

a.Write a program to define a class Shape with data members row and column. The superclass has a constructor that used to set row and column and method rectangle() with access specifier ‘protected’ which used to display the shape of rectangle.
b.Create a class ShapeTriangle that inherits from class Shape by implement keyword ‘extends’. This class has a constructor that make a call to superclass constructor by using keyword super() and a method triangle() that display the shape of triangle.

Expert Answer


[solved] – Question 95983

Write a program to define a class Shape with data members row and column. The superclass has a constructor that used to set row and column and method rectangle() with access specifier ‘protected’ which used to display the shape of rectangle.

Expert Answer


[solved] – Question 96031

Which of the options divide its input’s elements according to their position in the array?

Expert Answer


[solved] – Question 96047

Test if a number grade is an A (greater than or equal to 90). If so print “Great!”.

Example:
Enter a Number: 98

Output:
Great!

Expert Answer


[solved] – Question 96048

Test if a password entered is correct. The secret phrase is Ada Lovelace.

Expert Answer


[solved] – Question 96050

Test if a password entered is correct. The secret phrase is Ada Lovelace.

Expert Answer


[solved] – Question 96051

Test if a date is a payday based on the day of the month (15th or the 30th).
Sample run:

Enter today’s day numerically: 17
Sorry, not a payday.
Enter today’s day numerically: 30
It’s payday!

Expert Answer


[solved] – Question 96070

(1)
Write an algorithm to compute the quotient and remainder given that integer x(x>=0) is divided by another integer y(y>0). Assume that only addition and subtraction are the available arithmetics operations.

(2)
Write an algorithm to compute the perimeter and area of a triangle given the co-ordinates of its vertices

Expert Answer


[solved] – Question 96085

Q1.Write an algorithm to compute the quotient and reminder given that integer x(x >=0) is divided by another integer y(y>0). Assume that only addition and subtraction are the available arithmetic operation
Q2. Write an Algorithm to compute the perimeter and area of a triangle given the co_ordinates of its vertices

Expert Answer


[solved] – Question 96086

Q1.Write an algorithm to compute the quotient and reminder given that integer x(x >=0) is divided by another integer y(y>0). Assume that only addition and subtraction are the available arithmetic operation
Q2. Write an Algorithm to compute the perimeter and area of a triangle given the co_ordinates of its vertices

Expert Answer