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
3 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]3 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
What are the two types of cache memory?
alexandr402 [8]

Answer:

DRAM and SRAM

Explanation:

Cache memory is used to reduce the average time to access data from the Main memory.

SRAM is an on-chip memory whose access time is small (fast).

DRAM is an off-chip memory which has a large access time (slow).

4 0
3 years ago
Jeff has created a table to calculate the cost of raw materials that he purchases monthly. Cell A2 shows the fixed cost of the r
lisabon 2012 [21]

Answer:

the correct answer is A

5 0
3 years ago
Read 2 more answers
1. How can Josh create a computing environment where he and his coworkers can sign in with their
Mice21 [21]
B. Josh can create Microsoft accounts
Q. Why b?
A. Josh should install or carry a usb
8 0
2 years ago
Your biology teacher sent you a document that contains several diagrams to study for an upcoming test. However, they are quite s
nirvana33 [79]

Answer:

zoom

Explanation:

6 0
3 years ago
Read 2 more answers
Pleasee telllllllllllllllllll​
77julia77 [94]

Explanation:

  1. It allows you to know your flaws
  2. It helps you to improve yourself
4 0
2 years ago
Other questions:
  • Complete the method definition to output the hours given minutes. Output for sample program:3.5import java.util.Scanner;public c
    15·1 answer
  • What are threats to computer system
    5·2 answers
  • What is Gamekit Loa3's all questsions
    14·1 answer
  • What are two statements that are true about using an external hard drive for backing up data
    14·1 answer
  • A _______ is a particular type of report that is made up of strategic objectives and metrics to help the organization reach its
    10·1 answer
  • Many computer magazines and Web sites present comparisons of several DBMSs. Find one such DBMS comparison article and compare th
    10·1 answer
  • Is main memory fast or slow?
    9·1 answer
  • Describe how you will lunch a web browser using the start menu​
    6·2 answers
  • Programming Cycle. Arrange them in correct order​
    5·2 answers
  • Who invented the first mechanical computer? in what year was it invented?.
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!