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
Lera25 [3.4K]
2 years ago
9

printStars is a method that accepts a single int argument and returns no value. It prints as many stars as indicated by its argu

ment. Given a variable x of type double that has been given a value, write a statement that invokes printStars passing x as an argument. Assume that printStars is defined in the same class that calls it.
Computers and Technology
1 answer:
anygoal [31]2 years ago
7 0

Answer:

Incorrect question. You might want to review it.

Explanation:

printStars is a method that accepts a single int argument but the variable x that will be passed into the method during its call is of type double. Hence, there is going to be an error.

Hope this helps!

You might be interested in
On the planet Sigma, robots excavate chunks of a very precious cristaline. These chunks can be divided into smaller part only on
Rainbow [258]

Answer:

Start the algorithm and check the weight of the ship. Load the crystalline to the ship. Check to see if the ship weighs ship weight + k pound crystalline, if less, add more crystalline. If excess, remove the excess crystalline, but if the weight meets the condition, then take off with the loaded ship to planet sigma.

Explanation:

The algorithm continuously checks the weight of the ship on loading with the calculated sum of the ship and k pound crystalline weight. The ship is able to load the correct maximum amount of crystalline to the planet sigma.

7 0
2 years ago
The _______________ domain refers to any endpoint device used by end users, which includes but is not limited to mean any smart
viva [34]
The answer is <span>workstation.   </span>The workstation domain refers to any endpoint device used by end users, which includes but is not limited to mean any smart device in the end user's physical possession and any device accessed by the end user, such as a smartphone, laptop, workstation, or mobile device.
5 0
2 years ago
Write a copy assignment operator for CarCounter that assigns objToCopy.carCount to the new objects's carCount, then returns *thi
ollegr [7]

Answer:

Here is the copy assignment operator for CarCounter:

CarCounter& CarCounter::operator=(const CarCounter& objToCopy) {

carCount = objToCopy.carCount;

return *this;  }

The syntax for copy assignment operator is:

ClassName& ClassName :: operator= ( ClassName& object_name)

In the above chunk of code class name Is CarCounter and object name is objToCopy.

Assignment operator = is called which assigns objToCopy.carCount to the new objects's carCount.

This operator basically is called when an object which is already initialized is assigned a new value from another current object.

Then return *this returns the reference to the calling object

Explanation:

The complete program is:

#include <iostream>  //to use input output functions

using namespace std;   //to access objects like cin cout

class CarCounter {  //class name

public:  // public member functions of class CarCounter

CarCounter();  //constructor of CarCounter

CarCounter& operator=(const CarCounter& objToCopy);  //copy assignment operator for CarCounter

void SetCarCount(const int setVal) {  //mutator method to set the car count value

carCount = setVal;  } //set carCount so setVal

int GetCarCount() const {  //accessor method to get carCount

return carCount;  }  

private:  //private data member of class

int carCount;  };    // private data field of CarCounter

CarCounter::CarCounter() {  //constructor

carCount = 0;  //intializes the value of carCount in constructor

return; }  

// FIXME write copy assignment operator  

CarCounter& CarCounter::operator=(const CarCounter& objToCopy){

/* copy assignment operator for CarCounter that assigns objToCopy.carCount to the new objects's carCount, then returns *this */

carCount = objToCopy.carCount;

return *this;}  

int main() {  //start of main() function

CarCounter frontParkingLot;  // creates CarCounter object

CarCounter backParkingLot;   // creates CarCounter object

frontParkingLot.SetCarCount(12);  // calls SetCarCount method using object frontParkingLot to set the value of carCount to 12

backParkingLot = frontParkingLot;  //assigns value of frontParkingLot to backParkingLot

cout << "Cars counted: " << backParkingLot.GetCarCount();  //calls accessor GetCarCount method to get the value of carCount and display it in output

return 0;  }

The output of this program is:

Cars counted = 12

3 0
2 years ago
The problem solving process begins by first ______ the problem.
alexandr402 [8]

Answer:

identifying/acknowledging

Explanation:

7 0
2 years ago
You are the administrator for the contoso.com website. recently, the server hosting the website had a failure that caused it to
Alisiya [41]
Protecting the Power supply
Adding disk Arrays
Install an NLB Cluster
4 0
2 years ago
Other questions:
  • Currently, there are two major techniques used to develop programs and their procedures. name and describe them. html editor key
    11·1 answer
  • Richard uses Microsoft outlook as his email client. He wants to check whether he has received any new mail. Identify which key R
    12·1 answer
  • Distinguish multiple inheritance and selective inheritance in oo concepts.
    14·1 answer
  • Prove that f(n) = 20n3 + 10nlogn + 5 is O(n3)
    12·1 answer
  • Using basic programming (for loops, while loops, and if statements), write two MATLAB functions, both taking as input:
    6·1 answer
  • Without using any additional variables, and without changing the values of ndays or the elements of the parkingTickets array, wr
    14·1 answer
  • Nathan would like to save his PowerPoint presentation as a video that can be replayed easily on any device at full quality. Whic
    14·1 answer
  • As a twist on the Hello World exercise, you are going to be the end user of the Hello class. This class is designed to greet the
    9·1 answer
  • Which group contains the command to manually conduct a spell check ?
    9·1 answer
  • Accenture has partnered with a global construction company that specializes in building skyscrapers. The company wants better ma
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!