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
butalik [34]
2 years ago
8

An instance variable name of type String, initialized to the empty String. An instance variable score of type int, initialized t

o zero. A method called setName that has one parameter, whose value it assigns to the instance variable name. A method called setScore that has one parameter, whose value it assigns to the instance variable score. A method called getName that has no parameters and that returns the value of the instance variable name. A method called getScore that has no parameters and that returns the value of the instance variable score.
Computers and Technology
1 answer:
timofeeve [1]2 years ago
8 0

Answer:

public class Class {

   private String name ="";

   private int score = 0;

   //Method SetName

   public void setName(String newName){

       name = newName;

   }

//Method SetScore

   public void setScore(int newScore){

       score = newScore;

   }

//Method GetName

   public String getName() {

       return name;

   }

//Method GetScore

   public int getScore() {

       return score;

   }

}

Explanation:

  • The class called Class is implemented in Java programming language
  • It has two fields (instance variables name and score)
  • Methods for setting the values of variables (mutator methods) or setters
  • Methods for getting the values of the variables (accessor methods) getters
You might be interested in
• What is the difference between primary storage, secondary storage, and off-line storage
sergiy2304 [10]


Primary storage refers to your RAM it is internal storage.

Secondary storage is any storage that is not the primary storage that permanently stores data. Examples are hard drive, tape disk drive, floppy disk drive  and compact disk drive. 

Off-line storage refers to any device that stores data that is not permanently attached to the computer. Example flash drives, The data remains on the storage device and can be connected to a different computer. 

3 0
3 years ago
NAND is logically complete. Use only NAND gates to constructgate-level circuits that compute the
Drupady [299]

Answer:

Hi, for this exercise we have two laws to bear in mind:

Morgan's laws

NOT(А).NOT(В) = NOT(A) + NOT (B)

NOT(A) + NOT (B) = NOT(А).NOT(В)

And the table of the Nand

INPUT OUTPUT

A B A NAND B

0 0         1

0 1         1

1 0         1

1 1         0

Let's start!

a.

Input            OUTPUT

A       A     A NAND A

1         1             0

0        0            1

b.

Input            OUTPUT

A       B     (A NAND B ) NAND (A NAND B )

0         0            0

0         1            0

1          0             0

1          1             1

C.

Input            OUTPUT

A       B     (A NAND A ) NAND (B NAND B )

0        0           0

0        1             1

1         0            1

1          1            1

Explanation:

In the first one, we only need one input in this case A and comparing with the truth table we have the not gate

In the second case, we have to negate the AND an as we know how to build a not, we only have to make a nand in the two inputs (A, B) and the make another nand with that output.

In the third case we have that the OR is A + B and we know in base of the morgan's law that:

A + B = NOT(NOT(А).NOT(В))

So, we have to negate the two inputs and after make nand with the two inputs negated.

I hope it's help you.

3 0
3 years ago
When did outdoor air pollution first become a significant problem?
zmey [24]
Out door air pollution has been a problem since ancient Romans...but the industrial revouloution was when outdoor air pollution increased and it a significant problem...
hope this helps
6 0
3 years ago
Kelly is a college sophomore majoring in computer science. She is interested in gaining exposure to the most useful and current
Nuetrik [128]

Answer:

Java

Explanation:

Java is a general-purpose programming language that is object-oriented, and has strong support for web development.

Therefore, one of the languages that a college sophomore majoring computer science learn is <u>Java,</u> an object-oriented programming language that is commonly used to write Web applications.

6 0
3 years ago
Function prototypes and function definitions look similar because they have the same function heading. In a function prototype t
hjlf

Answer:

In a function prototype the heading is followed by a semicolon, whereas in a function definition the heading is followed by a function block.

Explanation:

As the function prototype only declares the function and the function definition defines the operations in the function.

e.g:

add(int x, int y);  is the prototype

add(int x, int y)

{

     int sum;

     sum = x+y;

}    is the function definition.

3 0
2 years ago
Other questions:
  • Find the Mechanical Advantage and the maximum separation load for a wedge (length = 6 inches and height = 3 inches) used to spli
    12·1 answer
  • you were discussing software privacy with a friend were surprised to learn how software privacy can impact your life everyday. w
    10·1 answer
  • Micheal has increased the contrast of the given picture. Which feature or menu option of a word processing program did he use? A
    15·1 answer
  • Which type of computer operating system would be best for a large corporation?
    7·2 answers
  • Idea citizen activation
    9·2 answers
  • Explain the SCAN disk scheduling algorithm. Explain why it is sometimes called the Elevator Algorithm.
    9·1 answer
  • Applications require you to provide the following basic elements: social security number, experience, and favorite memories. Tru
    11·1 answer
  • Universal Containers maintains Job information in a Custom Object that contains sensitive information. The only users who should
    6·1 answer
  • A good CRM should Integrate marketing, sales, and customer support activities measuring and evaluating the process of knowledge
    13·1 answer
  • The term used to describe an OS designed mainly to share network resources.
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!