Welcome to Premium Paper Help

Please review the info below : Submit the .cpp and .h source code files on Ecampus. 1. Create a file named geometry.h that will contain

Please review the info below :

Submit the .cpp and .h source code files on Ecampus.

1. Create a file named geometry.h that will contain the following functions:

VolSphere()
AreaSphere()
VolCone()
AreaCone()
VolCylinder()
AreaCylinder()
VolDonut()

Hint: Donut/Torus volume = 2 * pi * pi * R * r * r

Food items will have these dimension:
Apple – sphere that is 3″ diameter
Pizza – cylinder that is 12″ diameter and 0.5″ thick
Donut – 4″ diameter and 2″ hole  (R=1.5, r=0.5)
Ice Cream Cone – cone is 5″ tall with a 2″ diameter; it has one scoop of ice cream that’s a 2.5″ diameter sphere

Create a program named food.cpp that asks the user how many apples, pizzas, donuts, and ice cream cones they will eat.  Tell the user the total volume of food they will eat.

Please turn in both the geometry.h file 
and food.cpp

2. Write a program called lol.cpp that allows the user to enter a sentence.  Then program then searches the sentence for various lolspeak abbreviations and substitutes them with the proper words. 

You should have a function named LOLSpeak that takes your sentence, abbreviation, and translation as parameters and returns the corrected sentence:

string LOLSpeak(string S, string Abbr, string Translation)

Make your program work with the three abbreviations below AND at least 7 more of your own (total 10).  You may assume that there is a space before and after your abbreviation. 

Search for this

Replace it with this

” u “

” you “

” lol “

” laughing out loud “

” brb “

” be right back “

Note: You cannot use a normal cin statement to input a sentence (it truncates after the first space).  Use the getline function:

String S;
getline(cin,S);

Program 2 Example Output

This program will correct ur lolspeak abrreviations.
Enter a sentence:
I think that u are lol at my joke.

The corrected sentence:
I think that you are laughing out loud at my joke.

Please not :

Check if the abbreviation is at the beginning or end of a sentence.

Have your abbreviations and replacements in a file that is read in and processed.

image1.gif

Share This Post

Email
WhatsApp
Facebook
Twitter
LinkedIn
Pinterest
Reddit

Order a Similar Paper and get 15% Discount on your First Order

Related Questions

Instructions  Advanced Practice Roles in Nursing: Use the South University Library and your assigned textbook to answer the following

Instructions  Advanced Practice Roles in Nursing: Use the South University Library and your assigned textbook to answer the following questions. Distinguish between Advanced Nursing Practice (ANP) and the Advanced Practice Nurse (APN). Briefly define advance nursing practice and the four roles in advanced practice nursing pertaining to clinical practice, primary

You will develop a substantive understanding of the six components of reading as a process by creating a Reading Development Paper. In this assignment, you

You will develop a substantive understanding of the six components of reading as a process by creating a Reading Development Paper. In this assignment, you will identify, define, and explain each of the following six reading components: (comprehension, oral language, phonological awareness, phonics, fluency, and vocabulary) and their relevance to

1 Assignment 1.3 Written Assignment

1 Assignment 1.3 Written Assignment 2 ______________________________________________________________________________________________________ Course Number: ART103 Course Title: Art History II: From the Early Modern to the Contemporary Instructor: Romain, Valerie Email Address: vromain@lasallecollegevanco uver.com Communication Channel: Omnivox: Mio Please visit lcvancouver.omnivox.ca/Login/ Account/Login?ReturnUrl=%2fi ntr to access Mio and Lea. Handout: Week 3 Submission due: Week 4

Please see attached for instructions. Thank you! Global Sourcing/Location Decisions Discussion Increased globalization and improved technologies

Please see attached for instructions. Thank you! Global Sourcing/Location Decisions Discussion Increased globalization and improved technologies have resulted in a variety of options for companies to locate their facilities. Facility location decisions affect the efficiency and effectiveness of managing supply chains and can make the difference between profit and loss.

Case 1 Chief Complaint (CC) 

Case 1 Chief Complaint (CC)  “It burns when I urinate” History of Present Illness (HPI) A 68-year-old Caucasian male who reports to have increase on the frequency of urination with urgency for the last 5 days. He also present dysuria and nocturia. PMH Benning prostatic hyperplasia diagnosed 3 years ago,