Question: write c++ program for following Q3): Demostrats a class that print the combination of strings. Your program should use two costat The first constructor should

write c++ program for following write c++ program for following Q3): Demostrats a class that print the

Q3): Demostrats a class that print the combination of strings. Your program should use two costat The first constructor should be an empty constructor that will allow to declare try of ring. The second constructor will initializes the length of the string , allocate the necessary space for the string to be stored and creates the string itself using story. Your program should consist of one member function join that concatenates two strings. It should estimates the length of the string to be joined, allocates the memory for the combined string and then uses step to copy the string and stecatto concatenate the strings. Your main function program should concatenate three strings into one string such Mirza Jameel Baig Q4): Write C++ code to represent a hitting game. The details are as follows: This game is being played between two teams (ie. your team and the enemy team). The total number of players in your team is randomly generated and is passed as argument to the constructor The constructor generates a pair of numbers and matches each pait. If the numbers get matched the following message is displayed: "Enemy got hit by your team!" Otherwise, the following message is displayed: "You got hit by the enemy team!" The number of hits should be equal to the number of players in your team The program should tell the final result of your team by counting the hits of both the team. Q3): Demostrats a class that print the combination of strings. Your program should use two costat The first constructor should be an empty constructor that will allow to declare try of ring. The second constructor will initializes the length of the string , allocate the necessary space for the string to be stored and creates the string itself using story. Your program should consist of one member function join that concatenates two strings. It should estimates the length of the string to be joined, allocates the memory for the combined string and then uses step to copy the string and stecatto concatenate the strings. Your main function program should concatenate three strings into one string such Mirza Jameel Baig Q4): Write C++ code to represent a hitting game. The details are as follows: This game is being played between two teams (ie. your team and the enemy team). The total number of players in your team is randomly generated and is passed as argument to the constructor The constructor generates a pair of numbers and matches each pait. If the numbers get matched the following message is displayed: "Enemy got hit by your team!" Otherwise, the following message is displayed: "You got hit by the enemy team!" The number of hits should be equal to the number of players in your team The program should tell the final result of your team by counting the hits of both the team

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!