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
Bess [88]
3 years ago
13

Write a class called SimpleSquare that has the following properties: - public int field called num - private int field called sq

uare - a constructor that takes a single parameter that sets the num, then sets square to num to the second power
Computers and Technology
1 answer:
mezya [45]3 years ago
6 0

Answer:

public class SimpleSquare{

   public int num;

   private int square;

   

   public SimpleSquare(int number){

       num = number;

       square = number * number;

   }

   

   public int getSquare(){

       return square;

   }    

}

Explanation:

*The code is in Java.

Create a class called SimpleSquare

Declare two fields, num and square

Create a constructor that takes an integer number as a parameter, sets the num and sets the square as number * number.

Since the square is a private field, I also added the getSquare() method which returns the value of the square.

You might be interested in
A(n) ______________________________ is a camera mount that uses the concept of a lever and fulcrum and allows a camera to be rai
rewona [7]
Hey and thanks for giving me the chance to serve u
_________________tripod 
_______________
hope l helped
4 0
3 years ago
What are the set of rules to move data from one computer to another?
ss7ja [257]
I don't believe that there are rules.
Hope I helped,
 Ms. Weasley
4 0
3 years ago
Select the qualification that is best demonstrated in each example. Trinity recommends investment strategies to customers. Laris
Viefleur [7K]

Answer:

1:decision making skills 2:integrity 3:communication 4:computer skill

Explanation:

got it right on edg 2020

pov: Your behind on classes

7 0
3 years ago
Read 2 more answers
What is the least number of bits you would need to borrow from the network portion of a Class B subnet mask to get at least 130
Tatiana [17]

Answer: Eight

Explanation:

A class B address is 255.255.0.0. We need to borrow 8 bits from the network portion to have atleast 130 host per subnet.

11111111.00000000.00000000.00000000

8 0
3 years ago
Ms word mode that adds text without overwriting anything
Feliz [49]

Answer:

Insert mode

Explanation:

In editing a document in text editors such as MS Word, there are two types of mode available.

i. Insert mode: This mode allows users to write texts without erasing anything. As new characters are typed, texts to the right of the insertion point are moved or displaced to the right thus preventing overwriting.

ii. Overtype mode: This mode allows users to write texts by erasing texts to the right of the insertion point.

Note: To enable either of this mode, press the "Insert" key on the keyboard. This key toggles between the <em>Insert</em> and the <em>Overtype</em> modes.

7 0
3 years ago
Other questions:
  • A great way to avoid tech distraction is to __
    11·2 answers
  • Complete the statement below with the correct term. In most cases, the more "blank" your question is on a forum, the better.
    5·2 answers
  • Which of the following would be an example of a loss of record integrity in a
    12·1 answer
  • WILL UPVOTE ALL plz
    13·1 answer
  • Which type of exception would be detected if you used the conversion command Convert.ToDecimal to try to convert an ampersand?
    14·1 answer
  • What are the requirements to connect the Internet?<br>plz answer it.....​
    10·1 answer
  • Tim is creating a page to display his poker club’s set of rules. He has main categories and subcategories along with about a par
    12·1 answer
  • Seven Features of computer aids design software
    6·1 answer
  • Customizing ads to people who had earlier visited the site is
    14·1 answer
  • If you play video games, please answer these questions it’s for a survey for my game development class!!
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!