Homework

Homework Questions? Ask a Tutor for Answers ASAP

Ask an Expert,
Get an Answer ASAP!

This answer was rated:

For LogicPro Only: Create an array based lookup table for…

For LogicPro Only: Create an array...
For LogicPro Only:
Create an array based lookup table for the following 48 C++ reserved words:
asm class double friend new return switch union
auto const else goto operator short template unsigned
break continue enum if private signed this virtual
case default extern inline protected sizeof throw void
catch delete float int public static try volatile
char do for long register struct typedef while
Use the following hash function to place the words into an array with 50 locations.
hash (key) = length (key) + value of first character + value of last character.
The character values are listed in the following table:
A = 11 E = 0 I = 13 M = 15 Q = 0 U = 31 Y = 40
B = 15 F = 15 J = 0 N = 13 R = 14 V = 10 Z = 0
C = 1 G = 23 K = 0 O = 0 S = 6 W = 26
D = 0 H = 15 L = 15 P = 25 T = 6 X = 0
Example: hash(“break”) = 5 + 15 + 0 = 20
Use Linear Probing for Collision Resolution with a step size of 1.
HashCpp Class
Define a C++ class named HashCpp that will manage the 48 C++ reserved words using an array based hash table implementation.
• The array consists of 50 addresses (0..49).
• The HashCpp class automatically performs the following operations when instantiated:
1. Initialize the hash table to empty
2. Read the 48 C++ reserved words found in a text file named res_words.txt one at a time and store them in the hash table (res_words.txt contains one reserved word per line).
• Once the hash table has been instantiated it can then be used to:
1. Search for a reserved word
 increment the element count when found
2. Display the contents of the hash table
Main Program
Write a complete C++ main/driver program that uses the HashCpp class to count the number of times each C++ reserved word appears in a text file. Read the file name from the user. Perform the steps listed below, then loop back to read and process another file until the user chooses to quit.
• The user specified file contains: C++ reserved words, C++ identifiers, and numeric constants.
• Read one line at a time from the user specified file.
• Scan the input line, character by character, stopping at the end of each word (reserved word or identifier) skipping over the numeric constants.
o Each line read from the user specified file will contain zero or more entries: words and/or numbers.
o All words start with a letter and end with either a blank space or the end of the current line/string.
• Search the hash table for each word that is discovered in the user specified file.
o If a reserved word is found, then increment the counter for that reserved word.
• After the user specified file has been fully processed output the table contents as shown below:
Output Format Requirements: (view) // display all 50 table entries in order 0..49
Address Reserved Word Count
14 goto 0 // “goto” does not appear in the user specified file
29 do 2 // “do” appears twice in user specified file
Show More
Show Less
Ask Your Own Homework Question
Answered in 6 minutes by:
3/28/2018
LogicPro
LogicPro, Engineer
Category: Homework
Satisfied Customers: 13,429
Experience: Expert in Java C++ C C# VB Javascript Design SQL HTML
Verified

Hi,

Welcome

Hope you are doing well.

Zip all files; upload the zipped file to http://wikisend.com or http://ge.tt and post download link here.

Ask Your Own Homework Question
Customer reply replied 28 days ago

I'm trying to upload my zipped file to http://wikisend.com, but I'm getting errors and it won't upload.

This is what I have on the .h file

#ifndef HASHCPP_H
#define HASHCPP_H

const unsigned LINE_SIZE = 80;

class HashCpp
{
private:
enum TableLimit { TABLE_SIZE = 50 };
struct TableNode
{
char element[LINE_SIZE + 1];
unsigned count;
};
TableNode hashTable[ TABLE_SIZE ];

unsigned hashElement( const char[] ) const;
unsigned convertChar( const char ) const;
void create(); // initialize hash table to empty
void fill(); // insert reserved words from file

public:
HashCpp ();
~ HashCpp ();
void find( const char[] );
void view() const;
};
#endif

Can you try again after removing spaces from the name

Zip all files including assignment with formatted text and any .h or .cpp file

Ask Your Own Homework Question
Customer reply replied 28 days ago

Here's the link

http://wikisend.com/download/630024/HashCpp.zip

Can you get to the file?

Yes. Thanks

deadline?

Ask Your Own Homework Question
Customer reply replied 28 days ago

Monday April 2nd at 11:59 pm

Thanks

Will have it ready

Ask Your Own Homework Question

Let me know once accepted

Thanks

LogicPro
LogicPro, Engineer
Category: Homework
Satisfied Customers: 13,429
Experience: Expert in Java C++ C C# VB Javascript Design SQL HTML
Verified
LogicPro and 87 other Homework Specialists are ready to help you
Ask your own question now
Customer reply replied 28 days ago

I accepted the offer

Thanks

Ask Your Own Homework Question
This answer is protected
Would you like to ask this question?
If you've already paid for this answer, simply Login.
Was this answer helpful?
Ask LogicPro Your Own Question
LogicPro
LogicPro
LogicPro, Engineer
Category: Homework
Satisfied Customers: 13,429
13,429 Satisfied Customers
Experience: Expert in Java C++ C C# VB Javascript Design SQL HTML

LogicPro is online now

A new question is answered every 9 seconds

How JustAnswer works:

  • Ask an ExpertExperts are full of valuable knowledge and are ready to help with any question. Credentials confirmed by a Fortune 500 verification firm.
  • Get a Professional AnswerVia email, text message, or notification as you wait on our site. Ask follow up questions if you need to.
  • 100% Satisfaction GuaranteeRate the answer you receive.

JustAnswer in the News:

Ask-a-doc Web sites: If you've got a quick question, you can try to get an answer from sites that say they have various specialists on hand to give quick answers... Justanswer.com.
JustAnswer.com...has seen a spike since October in legal questions from readers about layoffs, unemployment and severance.
Web sites like justanswer.com/legal
...leave nothing to chance.
Traffic on JustAnswer rose 14 percent...and had nearly 400,000 page views in 30 days...inquiries related to stress, high blood pressure, drinking and heart pain jumped 33 percent.
Tory Johnson, GMA Workplace Contributor, discusses work-from-home jobs, such as JustAnswer in which verified Experts answer people’s questions.
I will tell you that...the things you have to go through to be an Expert are quite rigorous.

What Customers are Saying:

Wonderful service, prompt, efficient, and accurate. Couldn't have asked for more. I cannot thank you enough for your help.

Mary C.Freshfield, Liverpool, UK

This expert is wonderful. They truly know what they are talking about, and they actually care about you. They really helped put my nerves at ease. Thank you so much!!!!

AlexLos Angeles, CA

Thank you for all your help. It is nice to know that this service is here for people like myself, who need answers fast and are not sure who to consult.

GPHesperia, CA

I couldn't be more satisfied! This is the site I will always come to when I need a second opinion.

JustinKernersville, NC

Just let me say that this encounter has been entirely professional and most helpful. I liked that I could ask additional questions and get answered in a very short turn around.

EstherWoodstock, NY

Thank you so much for taking your time and knowledge to support my concerns. Not only did you answer my questions, you even took it a step further with replying with more pertinent information I needed to know.

RobinElkton, Maryland

He answered my question promptly and gave me accurate, detailed information. If all of your experts are half as good, you have a great thing going here.

DianeDallas, TX

< Previous | Next >

Meet the Experts:

LogicPro

LogicPro

Engineer

13,429 satisfied customers

Expert in Java C++ C C# VB Javascript Design SQL HTML

Manal Elkhoshkhany

Manal Elkhoshkhany

Tutor

4,551 satisfied customers

More than 5000 online tutoring sessions.

Linda_us

Linda_us

Finance, Accounts & Homework Tutor

3,138 satisfied customers

Post Graduate Diploma in Management (MBA)

Chris M.

Chris M.

M.S.W. Social Work

2,636 satisfied customers

Master's Degree, strong math and writing skills, experience in one-on-one tutoring (college English)

F. Naz

F. Naz

Chartered Accountant

2,161 satisfied customers

Experience with chartered accountancy

Bizhelp

Bizhelp

CPA

1,887 satisfied customers

Bachelors Degree and CPA with Accounting work experience

Seanna

Seanna

Tutor

1,781 satisfied customers

3,000+ satisfied customers, all topics, A+ work

< Previous | Next >

Related Homework Questions
QUESTION 10 Alpha Inc., a U.S. firm, signs a contract with
QUESTION 10 Alpha Inc., a U.S. firm, signs a contract with Beta, Ltd., a Russian company, to give Beta the right to sell Alpha's products in Russia. This is usually known as: a. a distribution agreeme… read more
Chris M.
Chris M.
M.S.W. Social Work
Master's Degree
2,636 satisfied customers
QUESTION 1 The International Trade Administration (ITA) of
QUESTION 1 The International Trade Administration (ITA) of the U.S. Department of Commerce regulates import competition by: a. Promotion of trade and investment b. Strengthening industry competitivene… read more
Chris M.
Chris M.
M.S.W. Social Work
Master's Degree
2,636 satisfied customers
4. What is entered into a cell that is typically numeric and
4. What is entered into a cell that is typically numeric and can be used for calculations? A. Function B. Label C. Value D. Tab Question 5 of 20 : Select the best answer for the question. 5. Which is … read more
Cher
Cher
JustAnswer Expert & Mentor;Teacher/Tutor
Masters Degree
1,382 satisfied customers
1. What keeps Pip from accepting Herbert's job offer? A. His
1. What keeps Pip from accepting Herbert's job offer? A. His pride in being a gentleman B. A reluctance to work for Herbert C. Caring for Magwitch during his illness and trial D. Feeling that becoming… read more
Chris M.
Chris M.
M.S.W. Social Work
Master's Degree
2,636 satisfied customers
I have a marketing analytics question. Data, excel work.
I have a marketing analytics question. Data, excel work. … read more
F. Naz
F. Naz
Chartered Accountant
CA Finalist & Completed B.com
2,161 satisfied customers
For ashok kumar, Two single-phase transformers with the same
For ashok kumar, Two single-phase transformers with the same kVA rating are connected in parallel. Their respective per unit values of resistance are 0.005 and 0.01 and the per unit values of reactanc… read more
Ashok Kumar
Ashok Kumar
Master\u0027s Degree
291 satisfied customers
QUESTION 21 Which of the following is a false statement? A.
QUESTION 21 Which of the following is a false statement? A. In order to meet the consideration requirement, the legal detriment suffered by each party must have been given in exchange for that of the … read more
RobertJDFL
RobertJDFL
Attorney
Juris Doctorate
5 satisfied customers
I have a school assignment; I have to write a motion in
Hello there, I have a school assignment; I have to write a motion in liming regarding "Plaintiff lying to a professor about a stolen laptop" Plaintiff told professor laptop was stolen but one of her f… read more
F. Naz
F. Naz
Chartered Accountant
CA Finalist & Completed B.com
2,161 satisfied customers
Mean number of goals scored by the Panthers: 13; Data set:
Mean number of goals scored by the Panthers: 13; Data set: 9,15,14 (what is this missing #)?Thank you!… read more
Brad Summers
Brad Summers
Bachelor of Education
3 satisfied customers
In a population study 80% are Mexiican American. From the
In a population study 80% are Mexiican American. From the probability chart 1-12f find out what the chances are x=12. P=.0625 … read more
GLENN
GLENN
Master of Mathematics
398 satisfied customers
I have a question do want me to type it to you or is there a
i have a question do want me to type it to you or is there a fee that u will charge … read more
Ashok Kumar
Ashok Kumar
Master\u0027s Degree
291 satisfied customers
Choose one of the thirteenth-century literary forms
Choose one of the thirteenth-century literary forms discussed in the lesson "Thirteenth-Century Literature." Find more information about it in an encyclopedia or an anthology of medieval literature. R… read more
GLENN
GLENN
Master of Mathematics
398 satisfied customers
I just need some help for my Tefl course. I need to make a
Hello. i just need some help for my Tefl course. I need to make a straight-arrow ESA lesson plan for an elementary level class of adults in which the students would learn the vocabulary for finding pl… read more
F. Naz
F. Naz
Chartered Accountant
CA Finalist & Completed B.com
2,161 satisfied customers
I need help with an excel document. I have an excel document
I have an excel document that requires financial data put in the right columns from financial statement, balance sheet, and cash flow report from Alere Inc. I have the excel document and required financial report. … read more
F. Naz
F. Naz
Chartered Accountant
CA Finalist & Completed B.com
2,161 satisfied customers
Which of the following would measure the renal vein function
Which of the following would measure the renal vein function from the testicles to the kidney? Lower limb arterial doppler, lower limb venous doppler, carotid doppler, upper limb arterial doppler, upp… read more
GLENN
GLENN
Master of Mathematics
398 satisfied customers
Im trying to write an equation to test the following
Im trying to write an equation to test the following hypotheses - Districts that provide employee cybersecurity education provide more cybersecurity education opportunities for students than districts… read more
GLENN
GLENN
Master of Mathematics
398 satisfied customers
For ***** *. For this writing ,you'll write an essay in
For ***** *. For this writing ,you'll write an essay in which you acknowledge the reasonable people could support both mao's and ghandi perspective on ways to achieve independence. You'll also present… read more
GLENN
GLENN
Master of Mathematics
398 satisfied customers
I have got an audio assignment in Spanish which I had to
I have got an audio assignment in Spanish which I had to translate and submit.. so can you help me with that? … read more
Cher
Cher
JustAnswer Expert & Mentor;Teacher/Tutor
Masters Degree
1,382 satisfied customers
Disclaimer: Information in questions, answers, and other posts on this site ("Posts") comes from individual users, not JustAnswer; JustAnswer is not responsible for Posts. Posts are for general information, are not intended to substitute for informed professional advice (medical, legal, veterinary, financial, etc.), or to establish a professional-client relationship. The site and services are provided "as is" with no warranty or representations by JustAnswer regarding the qualifications of Experts. To see what credentials have been verified by a third-party service, please click on the "Verified" symbol in some Experts' profiles. JustAnswer is not intended or designed for EMERGENCY questions which should be directed immediately by telephone or in-person to qualified professionals.

Disclaimer: Information in questions, answers, and other posts on this site ("Posts") comes from individual users, not JustAnswer; JustAnswer is not responsible for Posts. Posts are for general information, are not intended to substitute for informed professional advice (medical, legal, veterinary, financial, etc.), or to establish a professional-client relationship. The site and services are provided "as is" with no warranty or representations by JustAnswer regarding the qualifications of Experts. To see what credentials have been verified by a third-party service, please click on the "Verified" symbol in some Experts' profiles. JustAnswer is not intended or designed for EMERGENCY questions which should be directed immediately by telephone or in-person to qualified professionals.

Show MoreShow Less

Ask Your Question

x