Question: write some functions for a knock-knock joke Create a C++ file called joke.cpp and implement the three functions opening(), setup() and punchline() specified in the
write some functions for a knock-knock joke
Create a C++ file called joke.cpp and implement the three functions opening(), setup() and punchline() specified in the header file joke.h
source code:
Joke.h:
#ifndef _JOKE_H_
#define _JOKE_H_
#include
string opening( ) ;
string setup() ;
string punchline() ;
#endif
Driver.cpp:
#include
#include
#include "joke.h"
using namespace std ;
int main() { cout << opening() << endl ;
cout << "Who's there?" << endl ;
cout << setup() << endl ;
cout << setup() << ", who???" << endl ;
cout << punchline() << endl ;
return 0 ; }
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
