Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

You use Excel Spreadsheet. You know what it is. A spreadsheet has its column title starting with the letter A, representing the first column. The

You use Excel Spreadsheet. You know what it is. A spreadsheet has its column title starting with the letter "A", representing the first column. The 2nd column's title is "B", and so on.

image text in transcribed

Write the following class member function that takes your Excel spreadsheet column title as input, and computes its corresponding column number in integer:

class CIS14 { public: int convertExcelTitleToNumber(string* s); };

For examples:

Input A Output: 1

Input: B

Output: 2 Input: Z

Output: 26

Input: AA Output: 27

Input: AB Output: 28

Input: AAA Output: 703

Input: AAAA Output: 18279

Constraints / Assumptions:

If input is NULL, return -1

The function takes a pointer to the input title string

Input is always a valid Excel column title (namely the title string contains only valid UPPER English characters 'A' - 'Z')

Your main() won't be graded but your class and its functionality will be graded.

It is your responsibility to compile your code in C++11/C++14 (no pre-C++11!). Failure to do that means your code isn't compilable and you will receive 0 points.

Wrong member function signature or wrong class declaration receive -1 styling point each

Grading for this problem is as follows:

Logic: 8 points (-1 point for each test failure)

Styling/Documentation: 2 points (-1 for wrong function signature, -1 for wrong class declaration, and/or -1 for lack of documentation)

1 2345678

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 Design And Relational Theory Normal Forms And All That Jazz

Authors: Chris Date

1st Edition

1449328016, 978-1449328016

More Books

Students also viewed these Databases questions

Question

What are Measures in OLAP Cubes?

Answered: 1 week ago

Question

How do OLAP Databases provide for Drilling Down into data?

Answered: 1 week ago

Question

How are OLAP Cubes different from Production Relational Databases?

Answered: 1 week ago