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
Tema [17]
3 years ago
9

What is printed when the following code has been executed?

Computers and Technology
1 answer:
serg [7]3 years ago
3 0
Hey it is 15 hope this helps
You might be interested in
Www.microsoft.com is an example of this (two words) (last letter is e) and has to be (10 letters)
a_sh-v [17]

Answer:

domain name (2 words, 10 letters)

6 0
3 years ago
Write the class RoadSegmet. The class inherits from Transportation Class. The Class have a vector hourlySpeeds data field which
OLEGan [10]

Answer:

The length of time on the road segment is calculated by taking it's distance and dividing by the speed at the time of departure. This length of time is then added to the departureTime parameter to get the arrivalTime.

Define a RiverSegment class that inherits from the base TransportationClass from above. This class will have a vector<double> scheduledDepartureTimes data field that will keep track of the departure time (e.g. 10.5 represents the time 10:30) of all ferries on the river. You can assume these are sorted. Additionally, there is a _speed value that is the speed of the ferry at all times (ferries tend to be consistently slow). There is a setSpeed function to change the _speed value. Additionally, there is an addDepartureTime(double hour) function to add a departure time to the vector. Make sure the time are sorted

Computing the arrival time for the RiverSegment is a little more complicated since you need to wait for the next available departure time. Once you find the next available departure time (after the departure time passed in), you need to add the length of time on the river segment. This is done by dividing the _distance by the _speed. Add the time on the river to the departure time (from the vector of departure times) and this will give you the arrive time.

note: If there is no departure time scheduled for after your planned departure, you need to take the first available departure the following day. Our solution assumes the departure times are the same every day.

TransportationLink.h

#include <string>

using namespace std;

#ifndef __TRANSPORTATIONLINK_H__

#define __TRANSPORTATIONLINK_H__

const int HOURS_PER_DAY = 24;

const int MINS_PER_HOUR = 60;

const int MINS_PER_DAY = MINS_PER_HOUR * HOURS_PER_DAY; //24 * 60

class TransportationLink {

protected:

string _name;

double _distance;

public:

TransportationLink(const string &, double);

const string & getName() const;

double getDistance() const;

void setDistance(double);

// Passes in the departure time (as minute) and returns arrival time (as minute)

// For example:

// 8 am will be passed in as 480 (8 * 60)

// 2:30 pm will be passed in as 870 (14.5 * 60)

virtual unsigned computeArrivalTime(unsigned minute) const = 0;

};

5 0
3 years ago
Rosa is a high school freshman with no savings. She wants to buy a new smartphone in a few months for $300. Which account type b
Iteru [2.4K]
Simple savings account
6 0
3 years ago
Read 2 more answers
When sending emails and setting goals, you want to go beyond checkpoints of activities for your goals. What are examples of chec
yulyashka [42]

Answer:

Open and click rates

Explanation:

Open and click rates are measuring units of how well your campaigns perform.

8 0
3 years ago
Express 42 as a product  of its prime factor​
salantis [7]
The only way to write 42 as the product
of primes.

Except to change the order of the factors is
2 × 3 × 7. We call 2 × 3 × 7 the prime factorization of 42.
6 0
3 years ago
Read 2 more answers
Other questions:
  • Need help with this file and due today!!
    6·1 answer
  • What is the absolute pathname of the YUM configuration file? REMEMBER: An absolute pathname begins with a forward slash
    12·1 answer
  • A network technician is assisting the security team with some traffic captures. The security team wants to capture all traffic o
    9·1 answer
  • In the United States, everyone is guaranteed work true or false
    13·1 answer
  • What term is defined as private data placed in a packet with a header containing routing information that allows the data to tra
    13·1 answer
  • How can a signature be added to an email message? Check all that apply.
    10·2 answers
  • Ashton assigned a string value to a variable. Which program statement should he use?
    5·1 answer
  • What does the following Boolean operators do?<br>AND function<br>OR function<br>NOT function​
    8·1 answer
  • What ethical concerns might arise from applying new IT to law enforcement?
    5·1 answer
  • What is the launching of a 3-D map called?
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!