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
nadezda [96]
2 years ago
12

A class that ______________ an interface must contain methods for all abstract methods in the interface. Otherwise, the class mu

st be declared as abstract.
Computers and Technology
1 answer:
WINSTONCH [101]2 years ago
8 0

Answer:  A class that implement an interface must contain methods for all abstract methods in the interface. Otherwise, the class must be declared as abstract.

Explanation:

It is necessary to implement all the abstract method that are present in the interface. Basically, this is one of the rule of abstract method. As, abstract method is define as without any implementation.

If any class contain abstract method then, it must be declare as abstract. Therefore, if a class are not implemented an interface method then, it should be declare as abstract.    

You might be interested in
Q-3 A technician is setting up a computer lab. Computers on the same subnet need to communicate with each
Tasya [4]

Answer:

the answer would be B proxy server

4 0
3 years ago
How would you convert this base 10 decimal into a base 2number?:
Tju [1.3M]

Answer:

The method of converting a base 10 or decimal number into base 2 or binary number is as following:-

  1. Divide the decimal number by 2 and store it's remainder.
  2. keep dividing the decimal number by 2 until it becomes 0 and also keep storing it's remainder.
  3. Then write the remainders in reverse order.This the binary number.

Refer the attached image for better explanation.

6 0
3 years ago
What is the output of the following program segment?
marissa [1.9K]

Answer:

5

Explanation:

The operator 'x++' is called the post increment operator, it is assign first and then increment.

The operator '++x' is called the pre increment operator, it is increment first  and then increment.

So, both are increment operator which increment the value by one.

initially the value of x is zero,

++x increase the value to 1 and than assign to x.

then, x++ it assign to x first then increment by 1 means x=2

and so on.....

Their are five increment operator are used. so, the result is 5.

3 0
3 years ago
How to change the size of my document in cs6?
Aleonysh [2.5K]
When you're saving your image, it will ask you what quality of the image you want to use and it will show you that you're using a larger or smaller filesize depending on the quality of the image your saving.

<TIP>  Make a duplicate layer before saving the image and uncheck the original. Always save the CS6 file too to re-edit later if need be. But that way you will have the file size you want and the original image is preserved
5 0
3 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
3 years ago
Other questions:
  • You are researching RAM for a computer you are building for a friend who will be using the system as a home office server for he
    13·1 answer
  • Your desktop computer monitor is not displaying a picture. What would you do to troubleshoot the problem?
    7·2 answers
  • How does technology set a negative impact on the adolescent of our society?
    14·1 answer
  • What do you like most about brainly?
    13·2 answers
  • Drag each label to the correct image.
    9·2 answers
  • The Solution Explorer window ____.
    15·1 answer
  • Create a dictionary that maps a fruit name to its color. Both the keys and the values should be stored as strings. Include only
    7·1 answer
  • 1k bits equals to how many bits
    12·1 answer
  • Microsoft PowerPoint is an example of a(n) _____ application.
    15·2 answers
  • Select the incorrect sentence from the options given below. *
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!