How JustAnswer Works:
  • Ask an Expert
    Experts are full of valuable knowledge and are ready to help with any question. Credentials confirmed by a Fortune 500 verification firm.
  • Get a Professional Answer
    Via email, text message, or notification as you wait on our site. Ask follow up questions if you need to.
  • 100% Satisfaction Guarantee
    Rate the answer you receive.
Ask Raj Your Own Question
Raj
Raj, Engineer
Category: Homework
Satisfied Customers: 1290
Experience:  4 + Experiance in IT Industry
16752232
Type Your Homework Question Here...
Raj is online now
A new question is answered every 9 seconds

/** * Driver.cpp - This file contains the driver code to

This answer was rated:

/**
* Driver.cpp - This file contains the driver code to test the
* linkedListType class implementation
*
* TODO: Include your name and course number here.
*/

#include
#include

#include "linkedList.h"

using namespace std;

template
void printList(linkedListType& a);

template
int dotProduct(linkedListType& a, linkedListType& b);

int main(int argc, char **argv)
{
// Declare two list variables for a and b
linkedListType a;
linkedListType b;

// Add some data to a
a.insertLast(44);
a.insertLast(34);
a.insertLast(-77);
a.insertLast(71);
a.insertLast(-89);
a.insertLast(0);
a.insertLast(-11);

// Add some data to b
b.insertLast(86);
b.insertLast(31);
b.insertLast(-64);
b.insertLast(21);
b.insertLast(-24);
b.insertLast(71);
b.insertLast(89);

// Print out the lists
cout << "a =";
printList(a);

cout << "b =";
printList(b);

// Calculate the dot product and print the result
int dp = dotProduct(a, b);
cout << "The dot product of a * b = ";
cout << dp;

cout << "\n\n** Press any key to continue **\n";
getchar();

return 0;
}

template
void printList(linkedListType& a)
{
cout << "[ ";

for (linkedListIterator itr = a.begin(); itr != a.end(); ++itr)
{
cout << *itr << " ";
}

cout << "]" << endl;

return;
}

template
int dotProduct(linkedListType& a, linkedListType& b)
{
// TODO: Implement the details for the dot product for a and b.
// Consider using two loops, one embedded within the other.

return 0;
}

Hi There,

I will be helping you with the requirement.

Can you compress all the files to be used together and post it using the post below:

 

STEP 1: GOTO Website www.wikisend.com
STEP 2: Upload your file there.
STEP 3: When Upload is 100% Complete it will provide the following details for the file:
FILE ID and Download Link
STEP 4: Copy both the details and post them here.

By when do you need the solution?

Thank you

Customer: replied 4 years ago.

By 9pm central standard time tonight 25 Aug 13.


 


Bit more informaiton :





modify the driver.cpp file by implementing the helper function called dotProduct(). The function will take the dot product of two lists: a and b are the two list parameters that will passed into the function, and the result of the dot product will be returned to the calling function. In this case main(). The prototype for this function is as follows:


template <class Type>
int dotProduct(linkedListType<Type>& a, linkedListType<Type>& b);




Can you compress all the files to be used together and post it using the post below:

 

STEP 1: GOTO Website www.wikisend.com
STEP 2: Upload your file there.
STEP 3: When Upload is 100% Complete it will provide the following details for the file:
FILE ID and Download Link
STEP 4: Copy both the details and post them here.

Thank you

Customer: replied 4 years ago.

linkedList.h


http://wikisend.com/download/313790/linkedList.h


 


driver.cpp


http://wikisend.com/download/453088/driver.cpp


 


 


http://wikisend.com/download/202204/PS1.pdf

Got the files.

I am working on the solution and will provide a working solution in next 30 - 45 min.
If possible please stay online.

Thank you
Customer: replied 4 years ago.

Thanks I'll be online

Solution for this one is ready.

I have done modification in only the Driver class so am posting only the driver class which can be used with your old linkedList.h file to get the output.

Please download the Modified driver class(driver.cpp) from the link below:
http://wikisend.com/download/967492/driver.cpp

If you face any difficulty than feel free to ask for help.

If the solution file is satisfactory than Please don't forget to RATE the Answer.
It will hardly take few seconds to RATE my Answer

Thank You and Have a Good Day.
I think my last post did not go through So I will post it again:

Solution for this one is ready.

I have done modification in only the Driver class so am posting only the driver class which can be used with your old linkedList.h file to get the output.

Please download the Modified driver class(driver.cpp) from the link below:
http://wikisend.com/download/967492/driver.cpp

If you face any difficulty than feel free to ask for help.

If the solution file is satisfactory than Please don't forget to RATE the Answer.
It will hardly take few seconds to RATE my Answer

Thank You and Have a Good Day.
Raj and 2 other Homework Specialists are ready to help you
THIS ANSWER IS LOCKED!

You need to spend $3 to view this post. Add Funds to your account and buy credits.
Thank you for your Feedback

In Future to request any new Question to me just begin your Question with TO RAJ followed by the Question in the following format:

TO RAJ: Followed by the Question.

Have a Good Day.