Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

IN C++ FORMAT PLEASE: INCLUDE COMMENTS NEXT TO THE IMPLEMENTED CODES YOU WRITE 1. Copy and paste the following code into a header file named

IN C++ FORMAT PLEASE: INCLUDE COMMENTS NEXT TO THE IMPLEMENTED CODES YOU WRITE

1. Copy and paste the following code into a header file named HashTable.h

2. Please do not alter this file in any way or you may not receive credit for this lab

3. implement each of the hash table functions whose prototypes are in HashTable.h.

4. Write these functions in a file named HashTable.cpp.

5. Please test each hash table function as you write it in a file named HashTableTest.cpp (which should include your main function).

6. Additionally, you will need to include your templated, doubly-linked List.h and the files Book.h and Book.cpp from Lab 7 in the same project as your Hash Table. (INCLUDED AT THE VERY BOTTOM PLEASE CHECK)

#ifndef HASHTABLE_H_ #define HASHTABLE_H_ #include #include "List.h" #include "Book.h" using namespace std; class HashTable { public: /**Constructors*/ HashTable(); //constructor ~HashTable();

//destructor

HashTable(const HashTable& ht); //copy constructor /**Access Functions*/ int hash(string key); //returns the hash value for the given key //the hash value is the sum of //of the ASCII values of each char in the key //% the size the of the table //Key for this table: title + author int countBucket(int index); //counts the number of Books at this index //returns the count //pre: 0<= index < SIZE int search(Book b); //Searches for b in the table //returns the index at which b is located //returns -1 if b is not in the table /**Manipulation Procedures*/ void insert(Book b); //inserts a new book into the table //calls the hash function on the key to determine //the correct bucket void remove(Book b); //removes b from the table //calls the hash function on the key to determine //the correct bucket /**Additional Functions*/ void printBucket(int index); //Prints all the books at index //pre: 0<= index < SIZE

//Should print according to the following formula:

//"Printing index

//skips two lines

//Next, prints each book at that index in the format: // by <author> //$<X.XX> //ISBN: <isbn> //followed by a blank line void printTable(); //Prints the first book at each index //along with a count of the total books //at each index by calling count_bucket //as a helper function //Prints in the format: //<-----------------------> //Bucket: <index> //<title> by <author> //$<X.XX> //ISBN: <isbn> //Number of books at this bucket: <number of elements at this index> //<-----------------------> private: static const int SIZE = 10; List<book> Table[SIZE]; }; #endif /* HASHTABLE_H_ */ </p> <p><strong>LIST.H FILE:</strong></p> <p>#ifndef LIST_H_ #define LIST_H_</p> <p> #include <iostream> #include <cstddef> //for NULL #include "assert.h" using namespace std;</p> <p> template <class listdata> class List { private: struct Node { listdata data; Node* next; Node* previous;</p> <p> Node(listdata data): data(data), next(NULL), previous(NULL){} };</p> <p> typedef struct Node* Nodeptr;</p> <p> Nodeptr first; Nodeptr last; Nodeptr iterator;</p> <p> int size;</p> <p> void reverse(Nodeptr node); //Helper function for the public printReverse() function. //Recursively prints the data in a List in reverse.</p> <p> bool isSorted(Nodeptr node); //Helper function for the public isSorted() function. //Recursively determines whether a list is sorted in ascending order.</p> <p> int binarySearch(int low, int high, listdata data); //Recursively searchs the list by dividing the search space in half //Returns the index of the element, if it is found in the List //Returns -1 if the element is not in the List</p> <p> public:</p> <p> /**Constructors and Destructors*/</p> <p> List(); //Default constructor; initializes and empty list //Postcondition: A new list object is created</p> <p> List (const List &list); //copy constructor</p> <p> ~List(); //Destructor. Frees memory allocated to the list //Postcondition: Memory that was created has been freed</p> <p> /**Accessors*/</p> <p> listdata getFirst(); //Returns the first element in the list //Precondition: List cannot be empty (there must be a first element)</p> <p> listdata getLast(); //Returns the last element in the list //Precondition: List cannot be empty (there must be a last element)</p> <p> bool isEmpty(); //Determines whether a list is empty.</p> <p> int getSize(); //Returns the size of the list</p> <p> listdata getIterator(); //returns the element currently pointed at by the iterator</p> <p> bool offEnd(); //returns whether the iterator is off the end of the list, i.e. is NULL</p> <p> bool isSorted(); //Wrapper function that calls the isSorted helper function to determine whether //a list is sorted in ascending order. //We will consider that a list is trivially sorted if it is empty. //Therefore, no precondition is needed for this function</p> <p> int getIndex(); //Indicates the index of the Node where the iterator is currently pointing //Nodes are numbered from 1 to size of the list //Pre: size != 0 //Pre: !off_end()</p> <p> int linearSearch(listdata data); //Searchs the list, element by element, from the start of the List to the end of the List //Returns the index of the element, if it is found in the List //Calls the above indexing functions in its implementation //Returns -1 if the element is not in the List //Pre: size != 0</p> <p> int binarySearch(int value, int low, int high); //Returns the index where data is located in the List //Calls the private helper function binarySearch to perform the search //Pre: size != 0 //Pre: List is sorted (must test on a sorted list)</p> <p> /**Manipulation Procedures*/</p> <p> void removeLast(); //Removes the value of the last element in the list //Precondition: List cannot be empty (there must be a last element to remove) //Postcondition: The last element is removed</p> <p> void removeFirst(); //Removes the value of the first element in the list //Precondition: List cannot be empty (there must be a first element to remove) //Postcondition: The first element is removed</p> <p> void insertLast(listdata data); //Inserts a new element at the end of the list //If the list is empty, the new element becomes both first and last //Postcondition: There is a new last element</p> <p> void insertFirst(listdata data); //insertFirst inserts a new Node IN FRONT OF the first node in the list each time it is called, //effectively creating a new front of the list. //Inserts a new element at the start of the list //If the list is empty, the new element becomes both first and last //Postcondition: There is a new first element</p> <p> void startIterator (); // moves the iterator to the start of the list</p> <p> void removeIterator(); //removes the element currently pointed to by the iterator. Iterator then points to NULL.</p> <p> void insertIterator(listdata data); //inserts an element after the node currently pointed to by the iterator</p> <p> void advanceIterator(); //advanceIterator: moves the iterator up by one node</p> <p> void advanceToIndex(int index); //Moves the iterator to the node whose index number is specified in the parameter //Pre: size != 0 //Pre: index <= size</p> <p> /**Additional List Operations*/</p> <p> void printList(); //Prints to the console the value of each element in the list sequentially //and separated by a blank space //Prints nothing if the list is empty</p> <p> bool operator==(const List &list); //Tests two lists to determine whether their contents are equal //Postcondition: returns true if lists are equal and false otherwise</p> <p> void printReverse(); //Wrapper function that calls the reverse helper function to print a list in reverse //prints nothing if the List is empty</p> <p>};</p> <p> template <class listdata></p> <p>//default constructor List<listdata> ::List() { first = NULL; last = NULL; size = 0; iterator = NULL;</p> <p>}</p> <p>//copy constructor template <class listdata> List<listdata>::List(const List &list) : size(list.size) { if(list.first == NULL) //If the original list is empty, make an empty list for this list { first = last = iterator = NULL; } else { first = new Node(list.first->data); //calling Node constructor Nodeptr temp = list.first; //set a temporary node pointer to point at the first of the original list iterator = first; //set iterator to point to first node of the new list</p> <p> while(temp->next != NULL) {</p> <p> temp = temp->next; //advance up to the next node in the original list iterator->next = new Node(temp->data); //using node constructor to create a new node with copy of data iterator = iterator->next; //advance to this new node</p> <p> }</p> <p> last = iterator; //Why do I need this line of code? iterator = NULL;</p> <p> } }</p> <p> //default destrcutor template <class listdata> List<listdata> ::~List() { Nodeptr cursor = first; Nodeptr temp; while(cursor != NULL) { temp = cursor->next; delete cursor; cursor = temp;</p> <p> } }</p> <p>template <class listdata> listdata List<listdata>:: getFirst() { assert(size!=0); return first->data; }</p> <p>template <class listdata> listdata List<listdata>::getLast() { assert(size!=0); return last->data; }</p> <p>template <class listdata> bool List<listdata>::isEmpty() { return (size == 0); }</p> <p>template <class listdata> int List<listdata>:: getSize() { return size; }</p> <p> template <class listdata> listdata List<listdata>:: getIterator() { assert (size !=0); assert(iterator != NULL);</p> <p> return iterator->data;</p> <p>}</p> <p> template <class listdata> bool List<listdata>:: offEnd() { if (iterator == NULL) { return true; }</p> <p> else { return false; }</p> <p>}</p> <p> template <class listdata> void List<listdata>:: removeLast() { assert (size != 0);</p> <p> if (first->next == NULL) {</p> <p> delete last; first = NULL; last = NULL; size = 0;</p> <p> }</p> <p> else {</p> <p> Nodeptr temp = first;</p> <p> while (temp->next != last) { temp = temp->next; }</p> <p> delete last; last = temp; last->next = NULL;</p> <p> } size --;</p> <p>}</p> <p>template <class listdata> void List<listdata>:: removeFirst ()</p> <p>{ assert(size!=0);</p> <p> if (size == 1) { delete first; first = last = NULL; size = 0;</p> <p> }</p> <p> else {</p> <p> Nodeptr temp= first; first = first->next; delete temp; size --;</p> <p> } }</p> <p>template <class listdata> void List<listdata>:: insertLast (listdata data) { if (size == 0) { first = new Node(data); last = first; }</p> <p> else { last -> next = new Node(data); last = last -> next; }</p> <p> size++; }</p> <p>template <class listdata> void List<listdata>::insertFirst(listdata data) { if (size==0) { first = new Node(data); last = first;</p> <p> }</p> <p> else { Nodeptr N = new Node(data); N->next = first; first->previous = N; first = N; }</p> <p> size++; }</p> <p>template <class listdata> void List<listdata>:: startIterator () { iterator = first;</p> <p>}</p> <p>template <class listdata> void List<listdata>:: removeIterator() { assert(iterator != NULL);</p> <p> if (iterator == last) {</p> <p> removeLast(); }</p> <p> else if (iterator == first) { removeFirst(); } else { iterator->previous->next = iterator->next; iterator->next-> previous = iterator->previous; delete iterator; iterator = NULL; } size --; }</p> <p>template <class listdata> void List<listdata>:: insertIterator(listdata data) { assert(iterator != NULL);</p> <p> if (iterator == last) { insertLast(data); } else { Nodeptr N = new Node(data); N->previous = iterator; N->next = iterator->next; iterator->next->previous = N; iterator->next = N; size++; }</p> <p>}</p> <p>template <class listdata> void List<listdata>:: advanceIterator() { assert (size != 0); assert (iterator != NULL);</p> <p> iterator = iterator->next;</p> <p> }</p> <p>template <class listdata> void List<listdata>::printList() { Nodeptr iter= first; while (iter != NULL) { cout << iter->data << " "; iter = iter->next; } cout << endl;</p> <p>}</p> <p>template <class listdata> bool List<listdata>:: operator == (const List& list) { if(size != list.size) return false; Nodeptr temp1 = first; Nodeptr temp2 = list.first; while(temp1 != NULL) { if(temp1->data != temp2->data) return false; temp1 = temp1->next; temp2 = temp2->next; } return true; }</p> <p> </p> <p>template <class listdata> void List <listdata>:: reverse(Nodeptr list) { Nodeptr temp = last;</p> <p> if (temp == NULL) return;</p> <p> else { cout << temp->data << endl; temp = temp->previous;</p> <p> } }</p> <p> template <class listdata> void List<listdata>:: printReverse() { reverse(first);</p> <p>}</p> <p>template <class listdata> bool List<listdata>:: isSorted() { if (size ==0) { return isSorted();</p> <p> } else reverse (last); return true; }</p> <p>template <class listdata> int List<listdata>:: getIndex() { assert (!offEnd()); assert (iterator != NULL);</p> <p> int count =1 ; Nodeptr temp= first;</p> <p> while (temp != iterator) { count++; temp = temp->next; } return cout ;</p> <p>}</p> <p>template <class listdata> void List<listdata>:: advanceToIndex(int index) { assert(size!=0); assert (iterator != NULL);</p> <p> iterator = first;</p> <p> for (int i = 1; i < index; i++) {</p> <p> iterator = iterator->next;</p> <p> } }</p> <p>template <class listdata> int List<listdata>::linearSearch(listdata data) { assert (size != 0);</p> <p> Nodeptr temp; temp = first; int location = 1;</p> <p> while (temp != NULL) {</p> <p> if (temp->data == data) { return location; }</p> <p> else { location++; temp = temp->next; } }</p> <p> return -1;</p> <p>}</p> <p> template <class listdata> int List<listdata>:: binarySearch(int low, int high, listdata value) { if (high < low) return -1; int mid = (low + high);</p> <p> if (mid % 2 != 0) { return mid; }</p> <p> else advanceToIndex(mid); if (getIterator() == value) { return mid; }</p> <p> else if (value < getIterator()) { return binarySearch(low, mid -1, value); }</p> <p> else return binarySearch( low, mid +1, value); }</p> <p> </p> <p>#endif /* LIST_H_ */</p> <p><strong>BOOK.H FILE:</strong></p> <p>#ifndef BOOK_H_ #define BOOK_H_</p> <p>#include <string> #include <ostream> using namespace std;</p> <p>class Book { private: string title; string author; unsigned isbn; double price;</p> <p>public:</p> <p>/**Constructors*/ Book();</p> <p> Book(string t, string a, unsigned i, double p);</p> <p> /**Access Functions*/ string get_title(); string get_author(); unsigned get_isbn(); double get_price();</p> <p> /**Manipulation Procedures*/ void set_title(string t); void set_author(string a); void set_isbn(unsigned i); void set_price(double p);</p> <p> /**Additional Functions*/</p> <p> friend ostream& operator<<(ostream& os, const Book& book); //prints out a book to the designated stream in the following format //<title> by <author> //$<price> //isbn #<isbn> //note that the << is required to be a friend function, not a member function //note2: do not print out the <> as part of the output</p> <p> bool operator==(const Book& book); //compares two books to determine if they are the same book</p> <p> bool operator<(const Book& book); //compares two books to determine if one comes before the other //alphabetically by title and secondarily by author if the two //books contain the same title //returns false if the two books are the same</p> <p> bool operator>(const Book& book); //compares two books to determine if one comes after the other //alphabetically by title and secondarily by author if the two //books contain the same title //returns false if the two books are the same</p> <p> };</p> <p> </p> <p> #endif /* BOOK_H_ */</p> <p><strong>BOOK.CPP FILE:</strong></p> <p> </p> <p>#include "Book.h"</p> <p>#include <iostream></p> <p>#include <iomanip></p> <p> </p> <p>Book::Book() :</p> <p> title(""), author(""), isbn(0), price(0.0) {</p> <p>}</p> <p>;</p> <p> </p> <p>Book::Book(string t, string a, unsigned i, double p) {</p> <p> title = t;</p> <p> author = a;</p> <p> isbn = i;</p> <p> price = p;</p> <p>}</p> <p> </p> <p>/**Access Functions*/</p> <p> </p> <p>string Book::get_title() {</p> <p> return title;</p> <p>}</p> <p> </p> <p>string Book::get_author() {</p> <p> return author;</p> <p>}</p> <p> </p> <p>unsigned Book::get_isbn() {</p> <p> return isbn;</p> <p>}</p> <p> </p> <p>double Book::get_price() {</p> <p> return price;</p> <p>}</p> <p> </p> <p>/**Manipulation Procedures*/</p> <p> </p> <p>void Book::set_title(string t) {</p> <p> title = t;</p> <p>}</p> <p> </p> <p>void Book::set_author(string a) {</p> <p> author = a;</p> <p>}</p> <p> </p> <p>void Book::set_isbn(unsigned i) {</p> <p> isbn = i;</p> <p>}</p> <p> </p> <p>void Book::set_price(double p) {</p> <p> price = p;</p> <p>}</p> <p> </p> <p>/**Additional Functions*/</p> <p>ostream& operator <<(ostream& os, const Book& book) {</p> <p> os << book.title << " by " << book.author << endl;</p> <p> os << "$" << book.price << endl;</p> <p> os << "isbn #" << book.isbn << endl;</p> <p> return os;</p> <p>}</p> <p> </p> <p>bool Book::operator ==(const Book& book) {</p> <p> return (title == book.title && author == book.author);</p> <p>}</p> <p> </p> <p>bool Book::operator <(const Book& book) {</p> <p> </p> <p> if (title == book.title) {</p> <p> return (author < book.author);</p> <p> }</p> <p> </p> <p> else {</p> <p> return (title < book.title);</p> <p> }</p> <p> </p> <p>}</p> <p> </p> <p>bool Book::operator >(const Book& book) {</p> <p> if (title == book.title) {</p> <p> return (author > book.author);</p> <p> }</p> <p> </p> <p> else {</p> <p> return (title > book.title);</p> <p> }</p> <p>}</p> <p><strong>Calling the Hash Function:</strong></p> <p>For the purposes of this assignment, we will be using the algorithm defined in class which sums the ASCII values of all the characters in the string key and scales the result to indices of the table.</p> <p>You are welcome to use this or an alternate hash algorithm for your course project. However, please use the provided hash algorithm for Lab 8</p> <p>The key that you should pass to the hash function is the Book's title concatenated with the Book's author. This key should provide enough unique information to differentiate among each book, even if the books have the same title or the same author. If both author and title are the same as another book's title and author, we can assume the book would be a duplicate entry in the table.</p> <p><strong>Hash Table Constructor and Destructor:</strong></p> <p>These functions should be left blank in HashTable.cpp.</p> <p>The List constructor is already called inside of the HashTable.h, at the following line:</p> <p> List<book> Table;</p> <p>Likewise, the destructor should be left blank, as the List destructor will automatically be called once Table goes out of scope.</p> <p><strong>Adding Values to the Hash Table:</strong></p> <p>The next step in the process is to be able to add a value to the hash table.</p> <p>Since we are using the separate chaining approach to collisions, we are using an array of Lists to represent our table.</p> <p>Each time we insert a new book into the table, we need to complete these steps:</p> <p>Call the hash function to determine at which index or bucket to place the Book inside the table</p> <p>Insert the Book at this index of the Table array.</p> <p>Note that you need to call the correct function from the List class to insert this book onto the end of the chain of books.</p> <p>Each time you insert a new book, it should be added onto the end of the chain.</p> </div> </section> <section class="answerHolder"> <div class="answerHolderHeader"> <div class="answer-heading"> <h2>Step by Step Solution</h2> </div> <div class="answerReviews"> <div class="starReview"> <div class="starIcon"> </div> <div class="starText"> </div> </div> </div> </div> <div class="answerSteps"> <p>There are <span>3</span> Steps involved in it</p> <div class="step"> <h3>Step: 1</h3> <img src="https://dsd5zvtm8ll6.cloudfront.net/includes/images/document_product_info/blur-text-image.webp" width="759" height="271" alt="blur-text-image" loading="lazy" decoding="async" fetchpriority="low"> <div class="step1Popup"> <h3>Get Instant Access to Expert-Tailored Solutions</h3> <p>See step-by-step solutions with expert insights and AI powered tools for academic success</p> <button class="view_solution_btn step1PopupButton">View Solution</button> </div> </div> <div class="step"> <h3 class="accordion">Step: 2</h3> <div class="panel"> <img src="https://dsd5zvtm8ll6.cloudfront.net/includes/images/document_product_info/blur-subtext-image.webp" width="975" height="120" alt="blur-text-image" loading="lazy" decoding="async" fetchpriority="low"> <button class="view_solution_btn stepPopupButton">Sign Up to view</button> </div> </div> <div class="step"> <h3 class="accordion">Step: 3</h3> <div class="panel"> <img src="https://dsd5zvtm8ll6.cloudfront.net/includes/images/document_product_info/blur-subtext-image.webp" width="975" height="120" alt="blur-text-image" loading="lazy" decoding="async" fetchpriority="low"> <button class="view_solution_btn stepPopupButton">Sign Up to view</button> </div> </div> </div> </section> </div> <div class="expertRight"> <section class="AIRedirect"> <div class="AIHolder"> <h2>Ace Your Homework with AI</h2> <p>Get the answers you need in no time with our AI-driven, step-by-step assistance</p> <a class="AILink" href="/ask_ai">Get Started</a> </div> </section> <section class="relatedBook"> <div class="bookHolder" > <div class="relatedBookHeading" > <h2>Recommended Textbook for</h2> <object class="freeTagImage" type="image/svg+xml" data="https://dsd5zvtm8ll6.cloudfront.net/includes/images/rewamp/document_product_info/free.svg" name="free-book-icon"></object> </div> <div class="bookMainInfo" > <div class="bookImage" > <a href="/textbooks/database-and-expert-systems-applications-23rd-international-conference-dexa-2012-vienna-austria-september-2012-proceedings-part-1-lncs-7446-2012th-edition-978-3642325991-176436"> <img src="https://dsd5zvtm8ll6.cloudfront.net/si.question.images/book_images/2024/01/6597fdf1c3ca4_7616597fdf1bf972.jpg" width="100" height="131" alt="Database And Expert Systems Applications 23rd International Conference Dexa 2012 Vienna Austria September 2012 Proceedings Part 1 Lncs 7446" loading="lazy"> </a> </div> <div class="bookInfo" > <h3 class="bookTitle"> <a href="/textbooks/database-and-expert-systems-applications-23rd-international-conference-dexa-2012-vienna-austria-september-2012-proceedings-part-1-lncs-7446-2012th-edition-978-3642325991-176436"> Database And Expert Systems Applications 23rd International Conference Dexa 2012 Vienna Austria September 2012 Proceedings Part 1 Lncs 7446 </a> </h3> <div class="bookMetaInfo" > <p class="bookAuthor"> <b>Authors:</b> <span>Stephen W. Liddle ,Klaus-Dieter Schewe ,A Min Tjoa ,Xiaofang Zhou</span> </p> <p class="bookEdition"> 2012th Edition </p> <p class="bookEdition"> 3642325998, 978-3642325991 </p> </div></div></div> <a href="/textbooks/computer-science-system-administration-2463" class="viewMoreBooks">More Books</a> </div> </section> </div> </div> <section class="relatedQuestion"> <div class="relatedQuestionHolder"> <h4>Students also viewed these Databases questions</h4> <div class="relatedQuestionSliderHolder"> <div class="relatedQuestionCart "> <div class="relatedQuestionCartHeader"> <h3>Question</h3> <div class="relatedStarRating"> <span class="star active">★</span><span class="star active">★</span><span class="star active">★</span><span class="star">★</span><span class="star">★</span> </div> </div> <a class="relatedQuestionText" href="/use-the-accounting-equation-to-answer-each-question-below-1-215960" > Use the accounting equation to answer each question below. 1. At the beginning of the year, Helena Companys assets were $90,000 and its stockholders equity was $50,000. During the year, assets... </a> <div class="relatedQuestionCartFooter"> <div class="relatedHistory"> <p> Answered: <span>1 week ago</span> </p> </div> </div> </div> <div class="relatedQuestionCart "> <div class="relatedQuestionCartHeader"> <h3>Question</h3> <div class="relatedStarRating"> <span class="star active">★</span><span class="star active">★</span><span class="star active">★</span><span class="star">★</span><span class="star">★</span> </div> </div> <a class="relatedQuestionText" href="/obtain-the-oxidation-number-for-the-element-noted-in-each-of-the-following-a" > Obtain the oxidation number for the element noted in each of the following. a. N in NO2 b. Cr in CrO42 c. Zn in Zn(OH)42 d. As in H2AsO3 </a> <div class="relatedQuestionCartFooter"> <div class="relatedHistory"> <p> Answered: <span>1 week ago</span> </p> </div> </div> </div> <div class="relatedQuestionCart "> <div class="relatedQuestionCartHeader"> <h3>Question</h3> <div class="relatedStarRating"> <span class="star active">★</span><span class="star active">★</span><span class="star active">★</span><span class="star">★</span><span class="star">★</span> </div> </div> <a class="relatedQuestionText" href="/study-help/managing-organizational-change/which-behavior-do-i-want-to-improve-the-most-2102391" > Which behavior do I want to improve the most? </a> <div class="relatedQuestionCartFooter"> <div class="relatedHistory"> <p> Answered: <span>1 week ago</span> </p> </div> </div> </div> <div class="relatedQuestionCart "> <div class="relatedQuestionCartHeader"> <h3>Question</h3> <div class="relatedStarRating"> <span class="star active">★</span><span class="star active">★</span><span class="star active">★</span><span class="star active half">★</span><span class="star">★</span> </div> </div> <a class="relatedQuestionText" href="/gasoline-is-typically-less-expensive-in-the-united-states-than" > Gasoline is typically less expensive in the United States than across the border in Canada but now suppose that U. S. gasoline price rises above that in Canada due to a change in taxes. How would the... </a> <div class="relatedQuestionCartFooter"> <div class="relatedHistory"> <p> Answered: <span>1 week ago</span> </p> </div> </div> </div> <div class="relatedQuestionCart "> <div class="relatedQuestionCartHeader"> <h3>Question</h3> <div class="relatedStarRating"> <span class="star active">★</span><span class="star active">★</span><span class="star active">★</span><span class="star active half">★</span><span class="star">★</span> </div> </div> <a class="relatedQuestionText" href="/study-help/questions/in-c-format-please-include-comments-next-to-the-implemented-12477627" > IN C++ FORMAT PLEASE: INCLUDE COMMENTS NEXT TO THE IMPLEMENTED CODES YOU WRITE 1. Copy and paste the following code into a header file named HashTable.h 2. Please do not alter this file in any way or... </a> <div class="relatedQuestionCartFooter"> <div class="relatedHistory"> <p> Answered: <span>1 week ago</span> </p> </div> </div> </div> <div class="relatedQuestionCart "> <div class="relatedQuestionCartHeader"> <h3>Question</h3> <div class="relatedStarRating"> <span class="star active">★</span><span class="star active">★</span><span class="star active">★</span><span class="star active half">★</span><span class="star">★</span> </div> </div> <a class="relatedQuestionText" href="/study-help/questions/problem-1019-comprehensive-variance-analysis-in-a-hospital-lo2-lo3-10298260" > Problem 10-19 Comprehensive Variance Analysis in a Hospital [LO2, LO3, LO4, LO5, LO6] Marc Goudreau, administrator of Clearwater Hospital, was puzzled by the prior months reports. Every month, its... </a> <div class="relatedQuestionCartFooter"> <div class="relatedHistory"> <p> Answered: <span>1 week ago</span> </p> </div> </div> </div> <div class="relatedQuestionCart "> <div class="relatedQuestionCartHeader"> <h3>Question</h3> <div class="relatedStarRating"> <span class="star active">★</span><span class="star active">★</span><span class="star active">★</span><span class="star active half">★</span><span class="star">★</span> </div> </div> <a class="relatedQuestionText" href="/study-help/questions/describe-why-gland-packing-should-have-some-small-amount-of-1056735" > describe why gland packing should have some small amount of leakage and may also require external cooling </a> <div class="relatedQuestionCartFooter"> <div class="relatedHistory"> <p> Answered: <span>1 week ago</span> </p> </div> </div> </div> <div class="relatedQuestionCart "> <div class="relatedQuestionCartHeader"> <h3>Question</h3> <div class="relatedStarRating"> <span class="star active">★</span><span class="star active">★</span><span class="star active">★</span><span class="star active half">★</span><span class="star">★</span> </div> </div> <a class="relatedQuestionText" href="/study-help/questions/in-the-deacon-process-for-the-manufacture-of-c12-a-1017346" > In the Deacon process for the manufacture of C12, a dry mixture of HCl and air is passed over a heated catalyst that promotes the oxidation of HCl to Cl2. The Deacon process can be reversed and HCl... </a> <div class="relatedQuestionCartFooter"> <div class="relatedHistory"> <p> Answered: <span>1 week ago</span> </p> </div> </div> </div> <div class="relatedQuestionCart "> <div class="relatedQuestionCartHeader"> <h3>Question</h3> <div class="relatedStarRating"> <span class="star active">★</span><span class="star active">★</span><span class="star active">★</span><span class="star active half">★</span><span class="star">★</span> </div> </div> <a class="relatedQuestionText" href="/study-help/questions/fscanf-retums-a-special-value-eof-that-stands-for-1056956" > fscanf retums a special value EOF that stands for... </a> <div class="relatedQuestionCartFooter"> <div class="relatedHistory"> <p> Answered: <span>1 week ago</span> </p> </div> </div> </div> <div class="relatedQuestionCart "> <div class="relatedQuestionCartHeader"> <h3>Question</h3> <div class="relatedStarRating"> <span class="star active">★</span><span class="star active">★</span><span class="star active">★</span><span class="star active half">★</span><span class="star">★</span> </div> </div> <a class="relatedQuestionText" href="/study-help/questions/prepare-closing-entries-to-retained-earnings-the-decade-companys-adjusted-1048502" > Prepare Closing Entries to Retained Earnings The Decade Company's adjusted trial balance contains the following balances as of December 31: Retained Earnings $8,500; Dividends $2,000; Sales $22,000;... </a> <div class="relatedQuestionCartFooter"> <div class="relatedHistory"> <p> Answered: <span>1 week ago</span> </p> </div> </div> </div> <div class="relatedQuestionCart "> <div class="relatedQuestionCartHeader"> <h3>Question</h3> <div class="relatedStarRating"> <span class="star active">★</span><span class="star active">★</span><span class="star active">★</span><span class="star active half">★</span><span class="star">★</span> </div> </div> <a class="relatedQuestionText" href="/study-help/questions/an-argument-of-one-it-should-return-the-next-element-1057087" > An argument of one, it should return the next element. And so on. What restrictions do you have to put on the types of the arguments in order to write a function that type checks correctly? </a> <div class="relatedQuestionCartFooter"> <div class="relatedHistory"> <p> Answered: <span>1 week ago</span> </p> </div> </div> </div> <div class="relatedQuestionCart "> <div class="relatedQuestionCartHeader"> <h3>Question</h3> <div class="relatedStarRating"> <span class="star active">★</span><span class="star active">★</span><span class="star active">★</span><span class="star active half">★</span><span class="star">★</span> </div> </div> <a class="relatedQuestionText" href="/study-help/managing-human-behavior-in-public/3-what-constructive-coping-skills-do-you-want-to-develop-2118805" > 3. What constructive coping skills do you want to develop or enhance? Do you want to, for example, start exercising more, learn meditation, manage your time better, develop a new hobby or activity,... </a> <div class="relatedQuestionCartFooter"> <div class="relatedHistory"> <p> Answered: <span>1 week ago</span> </p> </div> </div> </div> <div class="relatedQuestionCart "> <div class="relatedQuestionCartHeader"> <h3>Question</h3> <div class="relatedStarRating"> <span class="star active">★</span><span class="star active">★</span><span class="star active">★</span><span class="star active half">★</span><span class="star">★</span> </div> </div> <a class="relatedQuestionText" href="/study-help/managing-human-behavior-in-public/3-if-some-adjustments-are-in-order-then-first-consider-2118802" > 3. If some adjustments are in order, then first consider how you might eliminate some activities or time spent on doing things that are less important or out of balance. Then identify some specific... </a> <div class="relatedQuestionCartFooter"> <div class="relatedHistory"> <p> Answered: <span>1 week ago</span> </p> </div> </div> </div> <div class="relatedQuestionCart "> <div class="relatedQuestionCartHeader"> <h3>Question</h3> <div class="relatedStarRating"> <span class="star active">★</span><span class="star active">★</span><span class="star active">★</span><span class="star active half">★</span><span class="star">★</span> </div> </div> <a class="relatedQuestionText" href="/study-help/managing-human-behavior-in-public/3-where-and-how-would-you-begin-to-work-toward-2118791" > 3. Where and how would you begin to work toward getting such an innovation implemented? What factors do you think will support its adoption? What might be the significant barriers? </a> <div class="relatedQuestionCartFooter"> <div class="relatedHistory"> <p> Answered: <span>1 week ago</span> </p> </div> </div> </div> </div> </div> </section> <hr class="expert-separator"> <div class="next-previous-button"> <div class="navigationButtons"> <a class="previousQuestionButton" href="/study-help/questions/what-is-meant-by-a-one-to-many-12477626">Previous Question</a> <a class="nextQuestionButton" href="/study-help/questions/assume-the-variables-x-5-y-6-and-12477628">Next Question</a> </div> </div> </div> <div class="promo items-center justify-center hidden" style="margin-left:-15px;"> <div class="app_promo"> <div class="app_promo_headline"> <img class="app_promo_icon" alt="Mobile App Logo" width="40" height="40" loading="lazy" src="https://dsd5zvtm8ll6.cloudfront.net/includes/images/mobile/finalLogo.png"> <p class="app_promo_title font-sans items-center">View Answer in SolutionInn App</p> </div> <button class="app_promo_action redirection question_open_url='q_id=12477627&q_type=2'"> Download on the App Store </button> <button class="btn btn-default app_promo_dismiss"> Continue with the mobile website </button> </div> </div> </main> </div> <div class="blank-portion"></div> <footer> <div class="container footerHolder"> <div class="footerLinksFlex"> <div class="footerLinksCol col-md-3 col-lg-3 col-sm-6 col-6"> <p>Services</p> <ul> <li><a href="/site-map">Sitemap</a></li> <li><a href="/fun/">Fun</a></li> <li><a href="/study-help/definitions">Definitions</a></li> <li><a href="/tutors/become-a-tutor">Become Tutor</a></li> <li><a href="/study-help/categories">Study Help Categories</a></li> <li><a href="/study-help/latest-questions">Recent Questions</a></li> <li><a href="/study-help/questions-and-answers">Expert Questions</a></li> </ul> </div> <div class="footerLinksCol col-md-3 col-lg-3 col-sm-6 col-6"> <p>Company Info</p> <ul> <li><a href="/security">Security</a></li> <li><a href="/copyrights">Copyrights</a></li> <li><a href="/privacy">Privacy Policy</a></li> <li><a href="/conditions">Terms & Conditions</a></li> <li><a href="/solutioninn-fee">SolutionInn Fee</a></li> <li><a href="/scholarships">Scholarship</a></li> </ul> </div> <div class="footerLinksCol col-md-3 col-lg-3 col-sm-6 col-6"> <p>Get In Touch</p> <ul> <li><a href="/about-us">About Us</a></li> <li><a href="/support">Contact Us</a></li> <li><a href="/career">Career</a></li> <li><a href="/jobs">Jobs</a></li> <li><a href="/support">FAQ</a></li> <li><a href="/campus-ambassador-program">Campus Ambassador</a></li> </ul> </div> <div class="footerLinksCol col-md-3 col-lg-3 col-sm-6 col-12"> <p>Secure Payment</p> <div class="footerAppDownloadRow"> <div class="downloadLinkHolder"> <img src="https://dsd5zvtm8ll6.cloudfront.net/includes/images/rewamp/common/footer/secure_payment_method.png" class="img-fluid mb-3" width="243" height="28" alt="payment-verified-icon" loading="lazy"> </div> </div> <p>Download Our App</p> <div class="footerAppDownloadRow"> <div class="downloadLinkHolder mobileAppDownload col-md-6 col-lg-6 col-sm-6 col-6 redirection" data-id="1"> <img style="cursor:pointer;" src="https://dsd5zvtm8ll6.cloudfront.net/includes/images/rewamp/home_page/google-play-svg.svg" alt="SolutionInn - Study Help App for Android" width="116" height="40" class="img-fluid mb-3 " loading="lazy"> </div> <div class="downloadLinkHolder mobileAppDownload col-md-6 col-lg-6 col-sm-6 col-6 redirection" data-id="2"> <img style="cursor:pointer;" src="https://dsd5zvtm8ll6.cloudfront.net/includes/images/rewamp/home_page/apple-store-download-icon.svg" alt="SolutionInn - Study Help App for iOS" width="116" height="40" class="img-fluid mb-3" loading="lazy"> </div> </div> </div> </div> </div> <div class="footer-bottom"> <p>© 2024 SolutionInn. All Rights Reserved</p> </div></footer> <script> window.addEventListener("load",function(){jQuery(document).ready(function(t){t.ajax({type:"POST",url:"/",data:{trackUserActivity:!0,reqUri:document.URL,referer:document.referrer},success:function(t){}})})},!1),window.addEventListener("load",function(){jQuery(document).ready(function(t){t.ajax({type:"POST",url:"/",data:{insertCrawler:!0,reqUri:document.URL,parseTime:"0.056",queryTime:"0.01654768548584",queryCount:"30"},success:function(t){}})})},!1),window.addEventListener("load",function(){jQuery(document).ready(function(){function t(t="",n=!1){var i="itms-apps://itunes.apple.com/app/id6462455425",e="openApp://action?"+t;isAndroid()?(setTimeout(function(){return window.location="market://details?id=com.solutioninn.studyhelp",!1},25),window.location=e):isIOS()?(setTimeout(function(){return window.location=i,!1},25),window.location=e):(i="https://apps.apple.com/in/app/id6462455425",n&&(i="https://play.google.com/store/apps/details?id=com.solutioninn.studyhelp"),window.open("about:blank","_blank").location.href=i)}jQuery("#appModal").modal("show"),jQuery(".download-app-btn").click(function(){t(jQuery(this).attr("question_open_url"))}),jQuery(".redirection").click(function(){var n=jQuery(this).attr("question_open_url"),i=jQuery(this).attr("data-id");void 0!=n?1==i?t(n,!0):t(n,!1):1==i?t("",!0):t("",!1)}),jQuery(".app-notification-close").click(function(){jQuery(".app-notification-section").css("visibility","hidden");var t=new FormData;t.append("hide_notification",!0),jQuery.ajax({type:"POST",url:"/",data:t,cache:!1,contentType:!1,processData:!1,beforeSend:function(){},success:function(t){location.reload()}})})})},!1); </script> </body> </html>