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
andriy [413]
3 years ago
8

Assume that a variable variable, number Of Sides has been initialized. Write a statement that assigns the value True to the vari

able is Quadrilateral if number Of Sides is exactly 4 and False otherwise.
Computers and Technology
1 answer:
inna [77]3 years ago
7 0

Answer:

public class ANot {

   public static void main(String[] args) {

   

       int numberOfSides = 20;

       boolean isQuadrilateral;

       if(numberOfSides==4){

           isQuadrilateral = true;

           System.out.println("The triangle is quadrilateral");

       }

       else{

           isQuadrilateral=false;

           System.out.println("The triangle is not quadrilateral");

       }          

}

}

Explanation:

  1. Create and Initilize the int  variable numberOfSides (You can also receive this from a user using the scanner class for example).
  2. create a boolean variable isQuadrilateral
  3. Use if and else statement to check if numberOfSides ==4 and assign true to isQuadrilateral else assign false
You might be interested in
To ____ a public member function of a base class in the derived class, the corresponding function in the derived class must have
Norma-Jean [14]

Answer:

None of the mentioned options

Explanation:

  • If we define a method in a derived class with same declaration type as that of base class then it is said to be overriding a function which behaves differently which will depend on the object which is calling the method.
  • Option a,b and c are not any kind of methods we implement using coding.
  • Option d is done when number or data types of parameters are different than the declaration of the base type.

8 0
3 years ago
A loop that will output only the names that come before "Thor" in the alphabet from the names list.
matrenka [14]

names = ["Kevin", "Joe", "Thor", "Adam", "Zoe"]

names.sort()

for x in names:

   if x == "Thor":

       break

   else:

       print(x)

I made up my own names for the sake of testing my code. I wrote my code in python 3.8. I hope this helps.

3 0
2 years ago
if you want to exclude a portion of an image which option should be chosen?? A. Arrange B. Position C. Crop D. Delete
Anuta_ua [19.1K]
It would be C- crop. This allows you to specifically delete parts of the image using drag and drop features. Hope this helps!
3 0
2 years ago
Differentiate between childhood socialization and adulthood socialization ​
AveGali [126]

Answer:

In adolescence, socialization is concerned with the development of overarching values and the self-image. In adulthood, socialization involves more overt and specific norms and behaviors, such as those related to the work role as well as more superficial personality features.

6 0
3 years ago
3. Why did Steve Jobs and Steve Wozniak start working on developing computers?
LenaWriter [7]
Jobs was less hands-on when it came to developing computer software, and instead focused on design, advertising and talking to press, Wozniak said. “One thing he wanted was to somehow be important in the world, though he didn't have the academic or business, background, he had me,” he said.
4 0
3 years ago
Other questions:
  • Which tabs are expandable and collapsible? Check all that apply.
    7·2 answers
  • 1.Which type of camera tool pushes the picture back and makes it wider, exaggerating the distance between the background and for
    13·2 answers
  • The ______ is the information center that drivers need to refer to when they're NOT scanning the road.
    14·1 answer
  • Two routers connect with a serial link, each using its S0/0/0 interface. The link is currently working using PPP. The network en
    6·1 answer
  • The Nigerian 4-6-9 scam refers to a fraudulent activity whereby individuals claiming to be from a foreign country will promise a
    11·1 answer
  • Typically, a DVD has how many times more capacity than a CD?
    12·1 answer
  • Assume we are using the simple model for floating-point representation as given in this book (the representation uses a 14-bit f
    7·1 answer
  • 13./ Write a java program to input an integer N and compute its factorial. Print the number and the factorial.
    8·1 answer
  • The term used to describe an OS designed mainly to share network resources.
    10·1 answer
  • write an algorithm to settle the following question: a bank account starts out with $10,000. interest is compounded monthly at 6
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!