Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Purpose: The purpose of this project is to help the students to reinforce the knowledge from Chapter 8 of the textbook. Objectives: 1. Review the

Purpose: The purpose of this project is to help the students to reinforce the knowledge from Chapter 8 of the textbook. Objectives: 1. Review the top-down design 2. Understand and apply string methods, such as length, operator [], etc 3. Understand and apply functions in cctype library 4. Understand and apply vector methods, such as push_back, at, operator [], etc Problem Description: The project will solve two problems. Problem 1: The program will ask the user to enter a sequence of scores between 0 and 100, inclusive. The program then will print out the stats about these scores, including: the number of scores, the maximum score, the minimum score and the average score. Requirements for Solution to Problem 1: The students should implement the following two functions to solve this problem. void get_scores(vector &v); // get integer scores from keyboard and store in v. // we assume that the user will input scores in range // of 0 to 100, inclusive. User enter a negative // number to stop the input and end the function void print_stats(vector &v); // print out the stats of data that are stored in v // includes: max, min, total number of data, // and the average Problem 2: The program will ask the user to enter a sentence. The program will then display a message to indicate if this sentence is a palindrome. The following sentence is a palindrome: A nut for a jar of tuna. The white space and non English letters are not counted. The case difference is ignored. Requirements for Solution to Problem 2: The students should implement the following function to solve this problem bool is_palindrome(string sentence); // return true if the sentence is a palindrome; // false otherwise

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

Expert Oracle Database Architecture

Authors: Thomas Kyte, Darl Kuhn

3rd Edition

1430262990, 9781430262992

More Books

Students also viewed these Databases questions