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
pochemuha
4 years ago
12

A class is designed with two public attributes: attributeOne and attributeTwo. attributeOne is an integer data type while attrib

uteTwo is a string data type. Which pseudocode representation(s) of setters would be appropriate for this class? (Points : 5) A. int setAttributeOne(int newAttributeOne)
{
return attributeOne
}
B. void setAttributeOne(int newAttributeOne)
{
attributeOne = newAttributeOne
}
C. string setAttributeTwo (int newAttributeTwo)
{
attributeTwo = newAttributeTwo
}
D. void setAttributeTwo ()
{
attributeTwo =
Computers and Technology
1 answer:
nexus9112 [7]4 years ago
4 0

Answer:

B. void setAttributeOne(int newAttributeOne)

{

attributeOne = newAttributeOne

}

Explanation:

The class has two public attributes : int attributeOne and String attributeTwo.

The appropriate setters for these attributes will be as follows:

void setAttributeOne(int newAttributeOne)

{

attributeOne = newAttributeOne ;

}

void setAttributeTwo(int newAttributeTwo)

{

attributeTwo = newAttributeTwo;

}

The highlighted code corresponds to option B among the given options. So option B is the correct setter for attributeOne.

You might be interested in
Which part of project management takes deadlines into consideration?
Bess [88]

Answer:

resources because it is the resources that has the second authority over a business

4 0
3 years ago
Read 2 more answers
What is the output, if userVal is 5? int x; x = 100; if (userVal != 0) { int tmpVal; tmpVal = x / userVal; System.out.print(tmpV
spayn [35]

Answer:

The output is 20

Explanation:

This line divides the value of x by userVal

tmpVal = x / userVal;

i.e.

tmpVal = 100/5

tmpVal = 20

This line then prints the value of tmpVal

System.out.print(tmpVal);

i.e 20

Hence, The output is 20

4 0
3 years ago
Which device acts as a gateway to allow hosts to send traffic to remote ip networks?
SashulF [63]
A router.

------------------------------------
4 0
3 years ago
Read 2 more answers
Which best describes the possible careers based on
Kisachek [45]

Answer:

It's c bodie I'm fr on this question rn lol

6 0
3 years ago
Read 2 more answers
To clarify a word while reading, a
Crazy boy [7]

Answer:

look up the word in the dictionary and break it down

Explanation:

4 0
3 years ago
Other questions:
  • How many different Microsoft Windows file types can be infected with a virus?
    10·1 answer
  • A ____ port is a connection in which eight data lines transmit an entire byte of data at one moment in time.​
    10·1 answer
  • ____ is a practice where a user in enticed by possible rewards and then asked to provide personal information.
    14·1 answer
  • Scientific models can be used for a variety of different purposes. Which of the following statements about scientific models is
    7·2 answers
  • Alice just wrote a new app using Python. She tested her code and noticed some of her lines of code are out of order. Which princ
    8·1 answer
  • Computers that have multiple CPUs within a single computer, sharing some or all of the system's memory and I/O facilities, are c
    15·1 answer
  • In a typical e-mail address, the "host" is user: which one of the following word processing features saves you the most time whe
    8·1 answer
  • How are computers 35 years ago and how are they presently and how are they going to be in the next 35 years
    9·1 answer
  • Edmentum Question- Consumer and Credit Loans
    15·1 answer
  • 1. Which of the following cables are used in networking? Check all that apply.
    8·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!