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]
2 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]2 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
It was field day for the upper grades at Rock Creek School,
Mariulka [41]

Answer:

its c

Explanation:

8 0
3 years ago
When saving a file, you must provide a valid file name that adheres to specific rules, referred to as _______________.
Naya [18.7K]

Answer:

a. file-naming conventions

Explanation:

File names need to follow certain criteria and constraints. Examples include:

  • File names must not start with special symbols.
  • File names can consist of letters,digits and special characters such as _.
  • File name can contain an extension after a dot sign.
  • File names must not be duplicates of an existing file.

Such constraints form part of file-naming conventions.

  • file-path represents the complete path to the file in the directory structure.
  • disk partition segments a hard disk into multiple volumes.
  • file-path starts from the root directory and spans one or more subdirectories to the location of the actual file.
6 0
3 years ago
What does it mean when a red squiggly line appears under a typed word? How do we fix it?
Alenkinab [10]
That means the device is programmed to mark the word as grammatically incorrect, if you double tap the word there should be a correct suggestion of the word instead. This may not always be the right one tho, ask someone experienced if you’re unsure.
3 0
3 years ago
The "edit" command must allow the user to find a record in the list by director. If there are multiple records with the same dir
sveticcg [70]

Answer:

To allow user to assign rating

Explanation:

The basic function of “rate” command is to give opportunity to the user to assign a value to a song from the range of 1 – 5.

In the range, the value of 1 indicates the lowest rating, while value of 5 is the highest rating that can be obtained.

Any previous ratings are then replaced by the new rating assigned from the range of 1 – 5.

7 0
3 years ago
What is the name of the app that works like a emp jammer from your iphone app
lions [1.4K]

To my knowledge there is not one if that did somehow occour, it would result in your phone also getting fried by the EMP and render the app useless before it effected anybody else's phone or other devices. hope this answered your question:)

4 0
3 years ago
Other questions:
  • A(n) ____________ is a program that translates a high-level language program into a separate machine language program.
    7·1 answer
  • Click to move a stacked object to the top of the stack?
    8·1 answer
  • What tasks does google do?
    5·1 answer
  • Taking away iPad privileges when a student hits another child would be considered a(an) ________ principle for decreasing or ext
    10·1 answer
  • A large IPv4 datagram is fragmented into 4 fragments at router 1 to pass over a network with an MTU of 1500 bytes. Assume each f
    15·1 answer
  • PowerPoint provides a wide variety of predefined shapes that can add visual insert to a slide true or false
    10·2 answers
  • For what kind of shot is a fisheye lens most appropriate?
    8·1 answer
  • According to the municipal solid waste report what are the benefits of recycling
    6·1 answer
  • What is the root of the tree?
    6·1 answer
  • What are the characteristics of the sorting and grouping options in Outlook? Check all that apply. Columns can be sorted by clic
    15·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!