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]
3 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]3 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
List 5 differences between monitors and printers​
Alinara [238K]
Monitor is a display for a computer system.
monitor is the primary memorable device.
a printer is a device that builds one static image and captures it permanently on a suitable medium.
a printer cannot project information unlike a monitor.
a monitor is mainly used for commands.
4 0
2 years ago
Which statement outputs a double value in a field of nine characters with three digits after the decimal point?
zimovet [89]

Answer:

Console.WriteLine("Format Double: {0:n3}", num); //formatting output with 3 digit decimal point

Explanation:

Following are the program in c#

using System; // namespace  

using System.Collections.Generic;

using System.Linq;

using System.Text;

namespace Tasks

{

   class Program 2 // program2

   {        

                 

       static void Main(string[] args) // Main function

       {

 

           double num = 958254.73789621;   // variables          

           Console.WriteLine("Format Double: {0:n3}", num); //formatting output with 3 digit decimal point

           Console.Read();

       }

   }

}

Output:

Format Double : 958254.737

Here we have declared  a variable num of type double which store the value num=958254.73789621. To do format with the double number i used a syntax {0:n3}. This syntax {0:n3}is separated with :(colon) here 0 represent the value before the decimal point that is 958254 and n3 represent the value upto 3 decimal points. Hence this statement give the output with three digit after the decimal point .

 

3 0
3 years ago
ROM is designed for _________
Sidana [21]
Computer Instructions

ROM, or Read Only Memory is used to store instructions as it retains memory even after power loss.
6 0
3 years ago
Arrange the steps in the process of manually installing software.
Ahat [919]

The correct sequence is: 5,3,1,4,2

When you are installing software on your computer you need to first open the CD-ROM and then insert the installation CD into the CD-ROM. If the contents of the CD opens, click on the executable file to start the wizard, and then follow the prompts in the wizard. Finally, you often need to reboot your computer after installing a new program.

5 0
3 years ago
0 50 100 150 200 250 300 350 400 Shape Size These shapes are the correct 50 01 100 150 Pattern Reference If you don't have red,
cricket20 [7]

Answer:

0 540 100 200 350 400 550 600 750

Explanation:

hope this helped

4 0
3 years ago
Read 2 more answers
Other questions:
  • A Hierarchy Custom Setting stores a specific URL for each profile in Salesforce. Which statement can a developer use to retrieve
    5·1 answer
  • An option button is a square button that enables you to make one choice among two or more options.
    15·1 answer
  • What would be a good hash code for a vehicle identification that is a string of numbers and letters of the form “9x9xx99x9xx9999
    9·1 answer
  • A user is trying to delete a file located on an ntfs volume on his windows 8 computer but is unable to do so. Why is this.
    5·1 answer
  • Write a loop to output the word EXAM 99 times
    8·1 answer
  • When you make a DNS query, where does your computer first check to find an IP address to name mapping?
    8·1 answer
  • Select the correct answer.
    8·2 answers
  • Which quality should an experiment have to be replicable and valid? O clearly detailed results O a well-cited research paper O s
    7·1 answer
  • Lattice-based access controls use a two-dimensional matrix to assign authorizations. What are the two dimensions and what are th
    6·1 answer
  • Which of the following was the first computer-animated film to win animated film to win an academy award?
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!