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
defon
3 years ago
6

Modify the definition of the throttle class on page 35, to create a new throttle ADT, which allows the user of the ADT to specif

y the number of shift levels when creating objects of that class. You don't need to provide an implementation of the new throttle ADT, just the class definition.

Computers and Technology
1 answer:
Nookie1986 [14]3 years ago
4 0

Answer:

seeexplaination

Explanation:

Code(header file):

#ifndef THROTTLESHIFTLVEL_H

#define THROTTLESHIFTLVEL_H

class throttle

{

int position;

public:

throttle()

{

position = 0;

}

// specify the number of shift levels when creating objects

throttle(int level)

{

position = level;

}

void shut_off()

{

position = 0;

}

void shift(int amount)

{

if(amount >= 0)

position = position + amount;

}

double flow() const

{

return position;

}

bool is_on() const

{

if (position > 0)

return true;

else

false;

}

};

#endif

Please kindly check attachment for screenshot

You might be interested in
Software that organizes, manages, and processes business data, such as data concerned with inventory, customers, and vendors, is
adoni [48]

Answer:

c) data management software

Explanation:

Software that organizes, manages, and processes business data, such as data concerned with inventory, customers, and vendors, is called data management software.

5 0
4 years ago
Write a method starString that accepts an integer parameter n and returns a string of stars (asterisks) 2n long (i.e., 2 to the
lys-0071 [83]

Answer:

public class Main

{

public static void main(String[] args) {

 System.out.println(starString(4));

}

public static String starString(int n){

    double p = Math.pow(2,n);

    String s = "";

    for(int i=0; i<p; i++)

        s += "*";

       

   return s;

}

}

Explanation:

Create a method named starString that takes an integer parameter, n

Get the 2 to the nth power using pow method and set it to the p

Create an empty string that will hold the asterisks

Create a for loop that will iterate p times. Inside the loop, concatenate an asterisk to the s

Return the s

Inside the main method, call the method with an integer parameter

4 0
3 years ago
Two hundred workstations and four servers on a single LAN are connected by a number of switches. You’re seeing an excessive numb
quester [9]

Answer:

Add more servers or decrease the amount of workstations

5 0
3 years ago
Joining a computer to active directory involves joining the computer to a workgroup. True or false.
pentagon [3]

Answer: False

Explanation:

7 0
1 year ago
what does it mean if you get the brainlyest ?and why does everyone want it so bad? and how do i give it to someone?
Bad White [126]

people mark the people who answered their question probably because they were asked to or their answer was what they were looking for and it helped them. and i don't know why people want it so bad, but personally for me i like getting brainliest because i guess it makes me look cool lol. also it's easy, to give brainliest, when you see a crown that's where you mark brainliest. but sometimes brainly doesn't show the crown i don't understand why, but it happens for some people including me.

8 0
3 years ago
Other questions:
  • A communications system connecting two or more computers is called a(n) ________.
    7·1 answer
  • When you add an rss feed to hootsuite publisher, posts from blogs and websites you designate will be?
    5·1 answer
  • With network management software, a network manager can ____.
    6·1 answer
  • Tortise and hare race java g Modify the main class so it runs the race 100 times and reports how many times each runner wins. (T
    7·1 answer
  • Camera lenses typically have very long focal points. true or false.
    5·2 answers
  • A computer program that translates a program statement by statement into machine language is called a/an?
    6·1 answer
  • When a security administrator wants to conduct regular test on the strength of user passwords, what may be the best setup for th
    15·1 answer
  • The first project that this position will work on is an embedded sensor that will send readings periodically to the cloud, and h
    9·1 answer
  • What should you include in a persuasive speech
    14·1 answer
  • Trading stock or selling stock, selling real estate for profit, and selling other assets that gain value over time.
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!