Fill in Order Details

  • Submit paper details for free using our simple order form

Make Payment Securely

  • Add funds to your account. There are no upfront payments. The writer will only be paid once you have approved your paper

Writing Process

  • The best qualified expert writer is assigned to work on your order
  • Your paper is written to standard and delivered as per your instructions

Download your paper

  • Download the completed paper from your online account or your email
  • You can request a plagiarism and quality report along with your paper

c++ homework

Option A – 100 points maximum

Modify Assignment 8 (or 7, or 5) to:

  1. Modify the movies class to created a linked list.
    Movies is now the head node pointer.
    Sample code will be provided although you are free to ignore it (zero credit for using an existing collection class, and see the note below).
  2. Load the list by inserting movies in ascending sequence by title.
    Add an overloaded operator< to the Movie class for this.
  3. Retrieve movies by a search key (not the full title; a search key of “or” should not yield any Toy Story movie).
    The key should not be case senstive; ‘xx’ and ‘xX’ should both retrieve ‘XXX’.
  4. If using Assignment 7/5 as the base, delete the options to retrieve movies by movie number and to get the next sequential movie.

 

It should not abort if the movie is not found.

You are free to create your own linked list solution, but it must incorporate templates, the node as a class, previous and next link pointers, and separate compilation.
Note the key word ‘create’; please do not submit canned linked list solutions copied from elsewhere.


Option B – 125 points maximum

Same as Option A, except

  1. A separate List class should be created, which would contain head and tail (last node) pointers, and all node navigation methods.
    (Node is still a separate class, which should now have all private members, with the list class as a friend.)
  2. Nodes are not referenced outside of the List class; Movies has (or is?) a list object and only references list methods.
  3. The search should start at the end of the list and work backward, returning the last movie in the list containing the search key (which is still the first one found; a search key of “ar” should not yield Avatar).

I Cant Seem to attach the Folder with it on the bottom for some reason. I pasted the homework assignment on the bottom.

 

Movie.cpp FILE

 

// Movies.cpp

#include “Movie.h” // include Movie class definition

#include “Movies.h” // include Movies class definition

#include <fstream>

#include <string>

using namespace std;

 

Movies::Movies(string fn){loadMovies(fn);}

 

void Movies::MakeTable(int S) {

for (int i = 0; i<S; i++)

movies[i] = NULL;

}

 

void Movies::loadMovies(string fn) {

MakeTable(SizeOfTable);

ifstream iS(fn);

 

string s;

int itemfound;

string SecTitle;

int SecHash;

getline(iS, s); // skip heading

getline(iS, s);

 

while(!iS.eof()) {

 

itemfound = s.find_first_of(“t”);

for (int i = 0; i < itemfound; i++)

SecTitle += s[i];

SecHash = runHash(SecTitle);

movies[SecHash] = new Movie(s);

SecTitle.clear();

getline(iS, s);

}

iS.close();

}

 

const Movie * Movies::operator [] (int MM) const{

return movies[MM];

}

int Movies::runHash(string s) {

int hashing = 0;

for (int i = 0; i < s.length(); i++) {

hashing = ((31 * hashing) + s[i]);

}

int table = abs(hashing);

return table % SizeOfTable;

}

 

MovieInforApp.cpp FILE

 

// MovieInfoApp.cpp

 

#include “Movie.h” // include Movie class definition

#include “Movies.h” // include Movies class definition

#include <iostream>

#include <iomanip>

#include <string>

using namespace std;

 

void main() {

double ratioCalc = 0;

int Statement = 2;

Movies movies(“Box Office Mojo.txt”);

string movieCode;

 

 

while (Statement != 0) {

cout <<“===========================Welcome To a Movie Search Program=================” <<endl <<endl;

cout << “Enter the Exact Movie Title that you would like to search” <<endl;

cout <<“If you are done searching, Please Press Enter to Exit: ” <<endl;

 

getline(cin, movieCode);

if(movieCode.length() > 0) {

 

int hash = Movies::runHash(movieCode);

Movie m = *movies[hash];

 

if(m.getTitle().length() > 0) {

cout << m.toString() << “n”;

if(m.getWorldBoxOffice() > 0) {

ratioCalc = ((float)m.getNonUSBoxOffice()/(float)m.getWorldBoxOffice())*100;

cout << “The ratio of World Boxx Office to Non-Us Box Office is : ” 

<<std::fixed << std::setprecision(2) << ratioCalc

<< “%” << “nnn”;}

else

cout << “No ratio due to zero value for World Box Officennn”;}

else 

cout << “”;

Statement = 8;}

else {

cout << “n”;

Statement = 0;

}

}

}

 

Movie.cpp FILE

 

// Movie.cpp

#include “Movie.h” // include Movie class definition

#include <string>

#include <sstream>

using namespace std;

 

Movie::Movie() {

title = studio = “”;

boxOffice[WORLD] = boxOffice[US] = boxOffice[NON_US] = 

rank[WORLD] = rank[US] = rank[NON_US] = releaseYear = 0;

}

 

Movie::Movie(string temp) {

istringstream iS(temp);

getline(iS, title, ‘t’);

getline(iS, studio, ‘t’);

iS >> releaseYear >> boxOffice[WORLD] >> boxOffice[US] >> boxOffice[NON_US] >>

rank[WORLD] >> rank[US] >> rank[NON_US];

}

 

string Movie::getTitle() {return title;}

string Movie::getStudio() {return studio;}

long long Movie::getWorldBoxOffice() {return boxOffice[WORLD];}

long long Movie::getUSBoxOffice() {return boxOffice[US];}

long long Movie::getNonUSBoxOffice() {return boxOffice[NON_US];}

int Movie::getWorldRank() {return rank[WORLD];}

int Movie::getUSRank() {return rank[US];}

int Movie::getNonUSRank() {return rank[NON_US];}

int Movie::getReleaseYear() {return releaseYear;}

 

string Movie::toString() {

ostringstream oS;

oS << “nn                 Movie Informationn===================================================”

<< “n             Movie Title:t” << title << ”  (” << releaseYear << “)”

<< “n    US Rank & Box Office:t” << rank[US] << “t$” << boxOffice[US]

<< “nNon-US Rank & Box Office:t” << rank[NON_US] << “t$” << boxOffice[NON_US]

<< “n World Rank & Box Office:t” << rank[WORLD] << “t$” << boxOffice[WORLD]

<< “n”;

return oS.str();

}

 

Movies.h FILE

 

// Movies.h

#ifndef MOVIES_H

#define MOVIES_H

#include “Movie.h” 

#include <string>

using namespace std;

 

class Movies {

void MakeTable(int);

static const int SizeOfTable = 23298;

public:

Movies(string);

const Movie * operator [] (int) const;

static int runHash(string s);

private:

void loadMovies(string);

Movie * movies[SizeOfTable];

};

#endif

 

Movie.h FILE

 

// Movie.h

#ifndef MOVIE_H

#define MOVIE_H

#include <string>

using namespace std;

 

class Movie {

 

    string title, studio;

long long boxOffice[3]; 

short rank[3], releaseYear; 

enum unit {WORLD, US, NON_US};

 

public:

Movie();

Movie(string);

  string getTitle();

  string getStudio();

string toString();

    long long getWorldBoxOffice();

    long long getUSBoxOffice();

    long long getNonUSBoxOffice();

    int getWorldRank();

    int getUSRank();

    int getNonUSRank();

    int getReleaseYear();

 

};

#endif

 

I can email you the folder if you want. Please Let me know.

 

Thanks

 

 

WHAT OUR CURRENT CUSTOMERS SAY

  • Google
  • Sitejabber
  • Trustpilot
Zahraa S
Zahraa S
Absolutely spot on. I have had the best experience with Elite Academic Research and all my work have scored highly. Thank you for your professionalism and using expert writers with vast and outstanding knowledge in their fields. I highly recommend any day and time.
Stuart L
Stuart L
Thanks for keeping me sane for getting everything out of the way, I’ve been stuck working more than full time and balancing the rest but I’m glad you’ve been ensuring my school work is taken care of. I'll recommend Elite Academic Research to anyone who seeks quality academic help, thank you so much!
Mindi D
Mindi D
Brilliant writers and awesome support team. You can tell by the depth of research and the quality of work delivered that the writers care deeply about delivering that perfect grade.
Samuel Y
Samuel Y
I really appreciate the work all your amazing writers do to ensure that my papers are always delivered on time and always of the highest quality. I was at a crossroads last semester and I almost dropped out of school because of the many issues that were bombarding but I am glad a friend referred me to you guys. You came up big for me and continue to do so. I just wish I knew about your services earlier.
Cindy L
Cindy L
You can't fault the paper quality and speed of delivery. I have been using these guys for the past 3 years and I not even once have they ever failed me. They deliver properly researched papers way ahead of time. Each time I think I have had the best their professional writers surprise me with even better quality work. Elite Academic Research is a true Gem among essay writing companies.
Got an A and plagiarism percent was less than 10%! Thanks!

ORDER NOW


Consider Your Assignments Done

“All my friends and I are getting help from eliteacademicresearch. It’s every college student’s best kept secret!”

Jermaine Byrant
BSN

“I was apprehensive at first. But I must say it was a great experience and well worth the price. I got an A!”

Nicole Johnson
Finance & Economics

Our Top Experts

See Why Our Clients Hire Us Again And Again!


OVER

10.3k
Reviews

RATING
4.89/5
Average

YEARS
13
Mastery

Success Guarantee

When you order form the best, some of your greatest problems as a student are solved!

Reliable

Professional

Affordable

Quick

Using this writing service is legal and is not prohibited by any law, university or college policies. Services of Elite Academic Research are provided for research and study purposes only with the intent to help students improve their writing and academic experience. We do not condone or encourage cheating, academic dishonesty, or any form of plagiarism. Our original, plagiarism-free, zero-AI expert samples should only be used as references. It is your responsibility to cite any outside sources appropriately. This service will be useful for students looking for quick, reliable, and efficient online class-help on a variety of topics.