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
Write code that prints: userNum ... 2 1 Print a newline after each number. Ex: userNum
ehidna [41]

Answer:

The program to this question can be given as follows:

Program:

public class data //defining class data

{

//main method

public static void main (String [] as) //declaring main method  

{

int userNum = 4; //declare variable userNum and assign value

for (userNum = 1; userNum <= 4; userNum++)  //loop for print values

{

System.out.println(userNum);  //print values in new lines.

}

}

}

Output:

1

2

3

4

Explanation:

In the above java program code firstly a class "data" is defined, inside this class the main method is defined in which an integer variable userNum is defined that holds a value that is "4".

  • In this method, a for loop is declare that uses variable userNum which starts from 1 and ends with a given value that is equal to 4.
  • Inside a for loop, the print function is used that print userNum variable each values in the newline.  

4 0
3 years ago
How do you get access To The advance server in Mobile legends
kiruha [24]

Answer: To enter the Advanced Server, please follow the below instructions: Tap into the Profile section and click Account Settings. Tap on the Switch Server button on the bottom right of the screen. This will allow the player to switch between the Original Server and Advanced Server.

Explanation: I play Mobile legends a lot so I know this

4 0
2 years ago
Computer Networks - Queues
lyudmila [28]

Answer:

the average arrival rate \lambda in units of packets/second is 15.24 kbps

the average number of packets w waiting to be serviced in the buffer is 762 bits

Explanation:

Given that:

A single channel with a capacity of 64 kbps.

Average packet waiting time T_w in the buffer = 0.05 second

Average number of packets in residence = 1 packet

Average packet length r = 1000 bits

What are the average arrival rate \lambda in units of packets/second and the average number of packets w waiting to be serviced in the buffer?

The Conservation of Time and Messages ;

E(R) = E(W) + ρ

r = w + ρ

Using Little law ;

r = λ × T_r

w =  λ × T_w

r /  λ = w / λ  +  ρ / λ

T_r =T_w + 1 / μ

T_r = T_w +T_s

where ;

ρ = utilisation fraction of time facility

r = mean number of item in the system waiting to be served

w = mean number of packet waiting to be served

λ = mean number of arrival per second

T_r =mean time an item spent in the system

T_w = mean waiting time

μ = traffic intensity

T_s = mean service time for each arrival

the average arrival rate \lambda in units of packets/second; we have the following.

First let's determine the serving time T_s

the serving time T_s  = \dfrac{1000}{64*1000}

= 0.015625

now; the mean time an item spent in the system T_r = T_w +T_s

where;

T_w = 0.05    (i.e the average packet waiting time)

T_s = 0.015625

T_r =  0.05 + 0.015625

T_r =  0.065625

However; the  mean number of arrival per second λ is;

r = λ × T_r

λ = r /  T_r

λ = 1000 / 0.065625

λ = 15238.09524 bps

λ ≅ 15.24 kbps

Thus;  the average arrival rate \lambda in units of packets/second is 15.24 kbps

b) Determine the average number of packets w waiting to be serviced in the buffer.

mean number of packets  w waiting to be served is calculated using the formula

w =  λ × T_w

where;

T_w = 0.05

w = 15238.09524 × 0.05

w = 761.904762

w ≅ 762 bits

Thus; the average number of packets w waiting to be serviced in the buffer is 762 bits

4 0
3 years ago
What is the purpose of including a section in a presentation?
lesya [120]

Answer:

To organize and name groups of slides

Explanation:

Edg 2021

8 0
2 years ago
Which best describes how an operating system works with the BIOS?
Fudgin [204]

The first one, It instructs the BIOS to complete a task. This also allows for everything else to run, including Windows, Linux, or main componets aswell.

6 0
3 years ago
Read 2 more answers
Other questions:
  • Which of these statements best describes an application programming interface?
    5·1 answer
  • How can investors receive compounding returns
    13·1 answer
  • Write a method swaparrayends() that swaps the first and last elements of its array parameter. ex: sortarray = {10, 20, 30, 40} b
    15·1 answer
  • PLEASEEE HELPPPP me
    13·1 answer
  • The Windows Remote Desktop Web connection that allows users to connect to a work or home computer and access files is considered
    7·2 answers
  • Demand is created through meeting customer buying criteria, credit terms, awareness (promotion) and accessibility (distribution)
    10·1 answer
  • You are setting up your Windows computer to connect to the Internet and notice that when you type www.microsoft, the browser doe
    15·1 answer
  • Persuasion is when Someone speaks to crowd about love <br>○True<br>○False​
    10·1 answer
  • You respond to a fire at a pharmaceutical production plant. One of the outside storage tanks is on fire. The placard on the tank
    10·1 answer
  • 12. In Justify the text is aligned both to the right and to the left margins, adding extra space between words as necessary *
    13·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!