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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started