answer.
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
Bumek [7]
1 year ago
13

Define a function UpdateTimeWindow() with parameters timeStart, timeEnd, and offsetAmount. Each parameter is of type int. The fu

nction adds offsetAmount to each of the first two parameters. Make the first two parameters pass by pointer. Sample output for the given program:

Computers and Technology
1 answer:
NARA [144]1 year ago
8 0

Answer:

Here is a UpdateTimeWindow() method with parameters timeStart, timeEnd, and offsetAmount

// the timeEnd and timeStart variables are passed by pointer

void UpdateTimeWindow(int* timeStart, int* timeEnd, int offsetAmount){

// this can also be written as  *timeStart = *timeStart + offsetAmount;

*timeStart += offsetAmount;  //adds value of offsetAmount to that of //timeStart

// this can also be written as  *timeEnd = *timeEnd + offsetAmount;

  *timeEnd += offsetAmount;  } //adds value of offsetAmount to that of //timeEnd

Explanation:

The function has three int parameters timeStart, timeEnd, and offsetAmount.

First two parameters timeStart and End are passed by pointer. You can see the asterisk sign with them. Then in the body of the function there are two statements *timeStart += offsetAmount; and *End+= offsetAmount; in these statements the offsetAmount is added to the each of the two parameters timeStart and timeEnd.

You might be interested in
Write a class for a Cat that is a subclass of Pet. In addition to a name and owner, a cat will have a breed and will say "meow"
fenix001 [56]

Answer:

The Java class is given below with appropriate tags for better understanding

Explanation:

public class Cat extends Pet{

  private String breed;

 public Cat(String name, String owner, String breed){

      /* implementation not shown */

      super(name, owner);

      this.breed = breed;

  }

  public String getBreed() {

      return breed;

  }

  public void setBreed(String breed) {

      this.breed = breed;

  }

  public String speak(){ /* implementation not shown */  

      return "Purring…";

  }

}

8 0
1 year ago
If parties in a contract are not ____, the contract can be canceled.
Anastasy [175]
Agreed to all the terms mentioned in the contract
5 0
2 years ago
In step 4 of the CSMA/CA protocol, a station that successfully transmits a frame begins the CSMA/CA protocol for a second frame
DerKrebs [107]

Answer:

There could be a collision if a hidden node problem occurs.

Explanation:

CSMA/CA(carrier sense multiple access/ collision avoidance) is a multiple access method in wireless networking, that allows multiple node to transmit. Collision avoidance of this method is based on preventing signal loss or downtime as a result of collision of transmitting multi signals.

If a node at step 4(transmit frame) sends the first frame, the node still needs to send a RTS(request to send) and to receive a Clear to send (CTS) from the WAP, the is to mitigate the issue of hidden node problem as all frame are treated as unit, so other listening nodes, not detected would seek to connect and transmit as well.

5 0
1 year ago
5. Assume a computer has a physical memory organized into 64-bit words. Give the word address and offset within the word for eac
spin [16.1K]

Answer:

see explaination and attachment

Explanation:

5.

To convert any byte address, By, to word address, Wo, first divide By by No, the no. of bytes/word, and ignores the remainder. To calculate a byte offset, O, in word, calculate the remainder of By divided by No.

i) 0 : word address = 0/8 = 0 and offset, O = 0 mod 8 = 0

ii) 9 : word address = 9/8 = 1 and offset, O = 9 mod 8 = 1

iii) 27 : word address = 27/8 = 3 and offset, O = 27 mod 8 = 3

iv) 31 : word address = 31/8 = 3 and offset, O = 31 mod 8 = 7

v) 120 : word address = 120/8 = 15 and offset, O = 120 mod 8 = 0

vi) 256 :word address = 256/8 = 32 and offset, O = 256 mod 8 = 0

6. see attachment for the python programming screen shot and output

4 0
1 year ago
Two blue armies are each poised on opposite hills preparing to attack a single red army in the valley. The red army can defeat e
labwork [276]

Answer:

I would attack with one blue army and while all the chaos I would send the foot soldier to the second blue army and tell them to attack with the first. Idk like if the foot soldier is the only way of communication, so yeah

6 0
2 years ago
Read 2 more answers
Other questions:
  • Computer hardware without software is useless while computer software without hardware is meaningless. Discuss. Plz provide exam
    15·1 answer
  • When conducting research, protecting the privacy of patients requires careful attention to ensure ?
    11·2 answers
  • Witch printer covers a large range of colors than any other printer does
    15·2 answers
  • _____________ involves the deployment of malware that secretly steals data in the computer systems of organizations, such as gov
    13·1 answer
  • Write a program to determine all pairs of positive integers, (a, b), such that a < b < 1000 and [a2 + b2 + 1)/(ab) is an i
    13·1 answer
  • Which of the following is not true about VOIP?
    9·1 answer
  • A machine is having issues, so the user is responsible for getting the machine serviced. Which stage of the hardware lifecycle d
    13·1 answer
  • A variable like userNum can store a value like an integer. Extend the given program to print userNum values as indicated. (1) Ou
    15·1 answer
  • For a custom App uploaded to Microsoft Teams, if an organization wants to disallow users from updating the settings of the custo
    12·1 answer
  • A shop will give discount of 10% if the cost of purchased quantity is more than 1000. Ask user for quantity suppose, one unit wi
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!