Code Monkey home page Code Monkey logo

css343-assignment4's People

Contributors

bluespartan700 avatar tonynology avatar wysohn avatar

Watchers

 avatar  avatar

css343-assignment4's Issues

DatabaseMovie<MovieKey, int>

  • This class acts as a database for all movies in the stock. Within this class, wehave std::vector, which is added to sort the MovieKey, along with the Mapinherited from the parent class to control the movie stock. Movies are sortedbased on the algorithms provided in the assignment doc, and may be searchedfor based on distinct keys assigned to them.
  • The sort() method is responsible for sorting the values in the std::vector, and weare going to implement it by using the std::sort() method provided by STL, whichworks with std::vector, yet we are going to provide custom comparator, thefunction, so that we can sort the MovieKeys in the order provided in theassignment doc.

Map<Hashable, V>

  • A Map is a storage, which stores values by pairing them with corresponding keys.
    The keys must be Map::Hashable, and it implies that the keys are stored
    in hashtable. Access to any value is thereby guaranteed to be O(1). Collision
    policy of this Map is closed, linear probing.

ClassicMovieKey

  • The class represent the Classic Movie. Classic movie, apart from the sharedfields like title, year, and director, has month and actor specific to the ClassicMovie.

CustomerKey

  • The wrapper class that will hold the customer ID number, which is a std::string.This class act as an adaptor to implement Hashable and Comparable interfacesas std::string is from the shared library, which we do not have any control.

DatabaseCustomer<CustomerKey, CustomerInfo>

  • This class acts as a database for all customers interacting with the movie stock.Customers are stored based on their distinct ID number using CustomerKey, andthe corresponding CustomerInfo identifies them by first and last name. Thisnumber acts as the key value to be search, if necessary.

Comparable

  • An interface that represent any class that can be compared with anotherComparable. Any children classes must implement comapreTo() method tocompare itself with any other Comparable classes. Depending on the context, themethod should return -1 if the current class is smaller than the class it’scomparing with, 0 if the current class is exactly the same with the class it’scomparing with, and 1 if the current class is larger than the class it’s comparingwith. The value returned is completely depending on the implementation of thechildren classes.

DatabaseTransaction<CustomerKey, std::queue<std::string>>

  • This class acts as a database for all transactions which occur on the movie stockcontents. Transactions are held within a queue structure, as the transactionhistory should be available in the order of occurrence. The key for searching willbe the CustomerKey, the ID number of the customer whose history is beingsearched, and the value will be a queue containing the transaction history of saidcustomer.

CustomerInfo

  • The class represent the details of the customer. It contains the customer ID, theirfirst name, and their last name.

Hashable

  • An interface that represent any class that can be ‘hashed.’ Since this is aninterface, the children classes must implement their own hashCode() and
    TeamSMGJeremiah Griffith, Tony Moon, Wooyoung Sonequals() method in order to make themselves as ‘hashable’ object. ThehashCode() produce the integer value that is as unique as possible, and theequals() method will be used for probing the hashtable when there are more thanone distinctive value, which are stored in linked list, exist for one hash valueexists.

AbstractDatabase<Hashable, V>

  • This class acts as an abstract class overarching the databases of this project,including movies, customers, etc. It holds the structure of a map, where the key isa hashable value, and the value is to be defined in the children classes. Itincludes the functions shared by the children classes, whose individualimplementation will be defined within the children (ex. input/output, get/set).

MovieKey

  • The abstract representation of the any movie’s key. All movies have title, year,and director by default, so we decided to put these shared fields into the abstractclass. By doing so, we can assume that any MovieKey must have title, year, anddirector regardless of their movie type.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.