Author Question: Can someone help me with this Java question? (Read 979 times)

natalie2426

  • Hero Member
  • *****
  • Posts: 524
I recently started my high school AP Computer Science. One of our homework assignments is: "Give the Java code for an object of class Rectangle and for an object variable of class Rectangle". I know how to use the Rectangle class and I know about objects but I'm confused about what the question is asking. Is it asking for the constructor of a Rectangle or something else. I'm especially confused by what they mean by object variable.



abarnes

  • Hero Member
  • *****
  • Posts: 556
I think they are asking for a class and just a variable declaration:

public class Rectangle {  ... }

vs.

Rectangle myRect;



Related Topics

Need homework help now?

Ask unlimited questions for free

Ask a Question
 

Did you know?

The training of an anesthesiologist typically requires four years of college, 4 years of medical school, 1 year of internship, and 3 years of residency.

Did you know?

Drug-induced pharmacodynamic effects manifested in older adults include drug-induced renal toxicity, which can be a major factor when these adults are experiencing other kidney problems.

Did you know?

Intradermal injections are somewhat difficult to correctly administer because the skin layers are so thin that it is easy to accidentally punch through to the deeper subcutaneous layer.

Did you know?

Approximately one in three babies in the United States is now delivered by cesarean section. The number of cesarean sections in the United States has risen 46% since 1996.

Did you know?

Although not all of the following muscle groups are commonly used, intramuscular injections may be given into the abdominals, biceps, calves, deltoids, gluteals, laterals, pectorals, quadriceps, trapezoids, and triceps.

For a complete list of videos, visit our video library