Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Objective: The objective of this lab is to give you more experience writing entire programs from scratch. We will be providing you skeleton development environment

Objective:

The objective of this lab is to give you more experience writing entire programs from scratch. We will be providing you skeleton development environment (basically empty .cpp files and a makefile to compile them) and you will create a fully functional program according to our specifications.

You will be given 4 short problems. These problems will need to be solved using a straight function based approach or a C++ class based approach.

You have to solve two of them using a C++ class based approach. The other two will have to be solved using functions (no classes except for standard C++ library classes).

For each program main() should contain the minimal logic necessary to solve these problems. For the class based projects most of the programming should be completed within the class itself. For the function based programs main() will need to contain more of the logic. However, you are encouraged to do the majority of the programming within separate functions.

Specifications:

In this homework you will be developing four programs. pyramid.cpp, prism.cpp, cubiod.cpp, and breakup-strings.cpp

The first three programs will be using the following geometric shapes:

Triangular Pyramid

Triangular Prism

Cuboid

You will need to prompt the user for the necessary information to calculate the surface area and the volume of these shapes. Please provide hand calculations to verify your program's output. You will scan these calculations to a PDF document or submit a word doc with your calculations to GITHUB.

The last program will implement functions to work with a comma separated list of works.

Given a comma separated string such as the following:

xyz,yuo,gho,kyo,etc,

Break the large string into individual strings demarcated by a comma and store them into a vector. Please consider using the find and substr functions of a C++ string to perform this task.

Once you have the vector write functions to do the following:

Produce a count of words that start with a specific letter (case insensitive)

Produce a count of words that contain a specific letter

Return the first string in the vector that contains a specific letter. Please return proper error code if a string is not found.

Return the first string that is alphabetically the largest (use the > operator)

Return the ASCII sum of all letters in a specific string

Write a main() to exercise these functions. They should all be called at least once.

All classes should have appropriate setters, getters, constructors, and print/display functions.

Your main() function should test all your functions and/or classes.

Task 3:

Develop your own solution to each problem.

for this assignment you will have four starter .cpp files. They are called breakup-strings.cpp, cubiod.cpp, prism.cpp, and pyramid.cpp. Each file is empty. You can create executables for all of them by typing make by itself. If you want to make a specific program just type make prism or make cubiod, etc.

Note: No executables will be created until you edit each file to add a main()

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Administrator Limited Edition

Authors: Martif Way

1st Edition

B0CGG89N8Z

More Books

Students also viewed these Databases questions

Question

d. How will lack of trust be handled?

Answered: 1 week ago

Question

What is the Definition for Third Normal Form?

Answered: 1 week ago

Question

Provide two examples of a One-To-Many relationship.

Answered: 1 week ago