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
Aleonysh [2.5K]
3 years ago
7

Write a C++ Programm in which inheritance is used

Computers and Technology
1 answer:
geniusboy [140]3 years ago
8 0

Answer:

// C++ program to demonstrate inheritance

#include <iostream>

using namespace std;

// base class

class Animal {

  public:

   void eat() {

       cout << "I can eat!" << endl;

   }

   void sleep() {

       cout << "I can sleep!" << endl;

   }

};

// derived class

class Dog : public Animal {

  public:

   void bark() {

       cout << "I can bark! Woof woof!!" << endl;

   }

};

int main() {

   // Create object of the Dog class

   Dog dog1;

   // Calling members of the base class

   dog1.eat();

   dog1.sleep();

   // Calling member of the derived class

   dog1.bark();

   return 0;

}

You might be interested in
11
siniylev [52]

Answer:

need help too

Explanation:

7 0
3 years ago
An RSS feed allows an organization to publish new content on a website, blog or other platform and syndicate this to subscribers
yuradex [85]
Makes it easier for people to subscribe to your webpage without having to go and visit it.
3 0
4 years ago
What is the difference between a technological problem and a technological opportunity? Explain with an example.
BigorU [14]
I will explain this concept using an example for Small Businesses.

The concept of Frustrated Users (Employees) is an example of a technological problem. Interacting with technology is a huge part of the employees’ day. Using slow, outdated systems with frequent problems makes it much more difficult for them to be happy and productive.

How would it impact a business if the company enabled the employees to get just 5 percent more accomplished every day? the answer is simply by keeping the technology up to date. So, the problem exposed above allows the company to find new ways and opportunities to make the job easier.

The company would need to establish a training plan for the employees. Maybe establishing a diploma course that allows them to learn and know better the new technologies.
7 0
4 years ago
Read 2 more answers
Write a C program that will allow you to add messages to a file that has NO permissions for any user. A Unix system has many fil
amm1812

Answer:

see explaination

Explanation:

#include <iostream>

#include <fstream>

#include <sys/types.h>

#include <sys/stat.h>

#include <time.h>

#include <stdio.h>

#include <stdlib.h>

using namespace std;

int main(int agrc,char*argv[])

{

struct stat sb;

if(agrc != 2){

cout << "invalind command line arguments "<< endl;

return 0;

}

if (stat(argv[1], &sb) == -1) {

perror("stat");

exit(EXIT_FAILURE);

}

if((sb.st_mode & 777) != 0) {

cout<<"file has permission and its invalid"<<endl;

}

//chmod(argv[1], S_IRWXU);

int status = chmod(argv[1], 0200);

if(status){

cout<<"permission sucessfull change"<<endl;

}

ofstream myfile;

myfile.open (argv[1], ios::out | ios::app);

myfile<<argv[2]<<endl;

status = chmod(argv[1], 0000);

if(status){

cout<<"permission sucessfull change

0000"<<endl;

}

myfile.close();

cout << "thank you" << endl;

return 0;

6 0
3 years ago
A company is utilizing servers, data storage, data backup, and software development platforms over an Internet connection.Which
vichka [17]

Answer:

The answer woul be B

Explanation:

Cloud computing, often called simply "the cloud," is the delivery of on-demand computing services, all from applications to data centers, through the Internet on a pay-per-use basis.

Flexible resources: scale quickly and easily, horizontally and vertically, to meet demand

Measured service so you only pay for what you use

Self-service: all the IT resources you need with self-service access

Software as a service (SaaS)

* Cloud-based applications, or software as a service, run on distant computers "in the cloud" that are owned by others and operated by others, and that connect to users' computers through the Internet and, Usually a web browser.

A private cloud is an infrastructure that is operated exclusively by a single organization, either managed internally or by a third party, and is hosted internally or externally. Private clouds can take advantage of cloud efficiencies, while offering greater control of resources and avoiding multi-tenancy.

Key aspects of the private cloud

A self-service interface that controls services, allowing IT staff to provide, allocate and distribute IT resources on demand.

Highly automated management of resource pools for everything from computing capacity to storage, analytics and middleware

Sophisticated security and control projected for specific company requirements

* Public clouds belong and are managed by companies that offer quick access to computer resources accessible through a public network. With public cloud services, users do not need to acquire hardware, software or support infrastructure, as they belong and are managed by providers.

6 0
3 years ago
Read 2 more answers
Other questions:
  • Can someone help me with...A table can help? PLEASE
    8·1 answer
  • What is that black thing on my wall?
    9·1 answer
  • is an interviewing method in which a mall interviewer intercepts and directs willing respondents to nearby computers where each
    7·1 answer
  • Implement a recursive method named power that takes 2 integer parameters named base and expo. The method will return the base ra
    6·1 answer
  • the increase and decrease font button and the change text colour button (as shown in the picture )are include in which group ?​
    6·1 answer
  • PLEASE HELP<br>what are some benefits of using graphic on web page?​
    6·1 answer
  • Ron is creating building blocks in Word. How can he make the building blocks that he created available?
    10·2 answers
  • True or false with reason :- profit and loss account is a real account​
    5·1 answer
  • Which invention replaced vacuum tubes in computers?
    8·1 answer
  • Explain the concepts of GIGO—garbage in, garbage out. Why do you think it’s a helpful concept in coding? How do you think it can
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!