New User Special Price Expires in

Let's log you in.

Sign in with Facebook


Don't have a StudySoup account? Create one here!


Create a StudySoup account

Be part of our community, it's free to join!

Sign up with Facebook


Create your account
By creating an account you agree to StudySoup's terms and conditions and privacy policy

Already have a StudySoup account? Login here


by: Santos Fadel


Santos Fadel
GPA 3.76


Almost Ready


These notes were just uploaded, and will be ready to view shortly.

Purchase these notes here, or revisit this page.

Either way, we'll remind you when they're ready :)

Preview These Notes for FREE

Get a free preview of these Notes, just enter your email below.

Unlock Preview
Unlock Preview

Preview these materials now for free

Why put in your email? Get access to more of this material and other relevant free materials for your school

View Preview

About this Document

Class Notes
25 ?




Popular in Course

Popular in ComputerScienence

This 29 page Class Notes was uploaded by Santos Fadel on Monday October 19, 2015. The Class Notes belongs to CSCI 1200 at Rensselaer Polytechnic Institute taught by Staff in Fall. Since its upload, it has received 11 views. For similar materials see /class/224865/csci-1200-rensselaer-polytechnic-institute in ComputerScienence at Rensselaer Polytechnic Institute.

Similar to CSCI 1200 at RPI

Popular in ComputerScienence




Report this Material


What is Karma?


Karma is the currency of StudySoup.

You can buy or earn more Karma at anytime and redeem it for class notes, study guides, flashcards, and more!

Date Created: 10/19/15
Computer Science II CSci 1200 Lectures 23 and 24 C Inheritance and Polymorphism Review from Lecture 22 0 Completed our discussion of binary heaps Push and pop Heap as a vector 7 Make heap Heap sort 0 Merging heaps and leftist heaps o The merge operations and the resulting push and pop operations Today s Class 0 Inheritance is a relationship among classes 0 Example of inheritance bank accounts 0 Basic mechanisms of inheritance 0 Types of inheritance o ls A Has A As A relationships among classes 0 Example of stack inheriting from list 0 Polymorphism o A polymorphic implementation of a Plane class Motivating Example 1 0 Consider different types of bank accounts 7 Savings accounts 7 Checking accounts 7 Time withdrawl accounts which are like savings accounts except that only the interest can be withdrawn 0 If you were designing C classes to represent each of these what mem ber functions might be repeated among the different classes What member functions would be unique to a given class 0 To avoid repeating common member functions and member variables we will create a class hierarchy where the common member functions and variables are placed in a base class and specialized ones are placed in derived classes Motivating Example 2 This is based on a homework problem from a previous semester that simulated the assignment of planes to use an airport s runways 0 There are two different plane classes one for planes that are leaving the airport TakeoffPlane and one for planes that are arriving at the airport LandingPlane Just as in the previous example there is repeated functionality that might better be placed in a base class Moveover the planes are stored in two different maps of pointers one for TakeoffPlane pointers and one for LandingPlane pointers Of course a hash table implementation of a map could be used as well ldeally instead we would have one map of Plane pointers This is an example of polymorphism where objects of different types are stored in one container through base class pointers Accounts Hierarchy We will use the accounts class hierarchy as a working example The code is attached Account is the base class of the hierarchy SavingsAccount is a derived class from Account The member variable balance in base class Account is protected which means i It is NOT publically accessible outside the class but i It is accessible in the derived classes SavingsAc count has inherited member functions and ordinarily de ned member functions SavingsAccount has inherited member variables and ordinarily de ned member variables i If the base class member variables were declared as private SavingsAccount member functions could not access them When using objects of type SavingsAccount the inherited and derived member functions are treated exactly the same 7 they are not distin guishable You can see this for the SavingsAccount class by looking at the main program 7 In particular note the use of compound which is de ned as a SavingsAccount member function and getba1ance which is de ned as a Account member function but used with a SavingsAccount object CheckingAccount is also a derived class from base class Account TimeAccount is derived from SavingsAccount SavingsAccount is its base class and Account is its indirect base class i We will discuss TimeAccount more below Constructors and Destructors o Constructors of a derived class call the constructor for the base class immediately before doing ANYTHING else i This can not be prevented You can only control the form of the constructor call 7 See the class constructors in each of the account classes 0 The reverse is true for destructors derived class constructors do their jobs rst and then base class destructors are called automatically 7 This is generally only a concern for classes with dynamically allo cated objects The objects must be only deleted once generally by the location in the class hierarchy that allocated theIn Overriding Member Functions in Derived Classes 0 A derived class may rede ne member functions in the base class 0 The function prototype must be identical not even the use of const can be different 7 Otherwise both functions will be accessible and major confusion will reign 0 Two examples are in class TimeAccount compound and withdraw Notice the syntax in the member function implementation showing how compound calls the compound function for its base class 0 Once a function is rede ned it is not possible to call the base class function directly only indirectly as in compund Exercise Create a class hierarchy of 2D geometric objects such as squares rectangles circles ellipses etc How should this hierarchy be arranged What member functions should be in each class Based on your hierarchy What member variables are available in each class Public Private and Protected Inheritance What is Accessible Where 0 Notice the line class SavingsAccount public Account o This speci es that the member functions and variables from Account do not change their public protected or private status in SavingsAccount o This is called public inheritance o protected and private inheritance are also possible 7 With protected inheritance public members becomes protected other members are unchanged 7 With private inheritance all members become private This is the default Stack Inheriting from List A simple example of using private inheritance is inheriting a stack from a list 0 Here is the full declaration and de nition of the stack template ltclass Tgt class stack private stdlistltTgt public stack stack stackltTgt constamp other stdlistltTgt other quotstack void push T constamp value this gtpushback value void pop this gtpopback T constamp top const return this gtback int size return stdlistltTgtsize bool empty return stdlistltTgtempty 0 Private inheritance hides the std listltTgt member functions from the outside world These member functions are still available to the member functions of the stackltTgt class Finally note that no member variables are de ned 7 the only member variables needed are in the list class When the stack member function uses the same name as the base class list member function the name of the base class followed by must be provided to indicate that the base class member function is to be used The copy constructor just uses the copy constructor of the base class without any special designation because the stack object is a list object as well Is A HasA As A Relationships Among Classes 0 When trying to determine the relationship between hypothetical classes Cl and C2 try to think of a logical relationship between them that can be written 7 Cl is a C2 7 Cl has a C2 or 7 Cl is implemented as a C2 o If writing Cl is a C2 7 is best for example a savings account is an account then Cl should be a derived class a subclass of C2 o If writing Cl has a C2 7 is best for example a cylinder has a circle as its base then class Cl should have a member variable of type C2 0 In the case of Cl is implemented as a C2 as in the stack is implemented as a list then Cl should be derived from C2 but with private inheri tance This is by far the least common case Introduction to Polymorphism 0 Let us consider a small class hierarchy version of plane 7 objects 7 The base class is a Plane 7 The derived classes are LandingPlane and TakeoffPlane 0 Here is Plane class Plane public Plane PlaneId constamp id int scheduledminute int numpassenger PlaneId constamp id const PlaneStatusType status const int scheduledminute const int runwaynumber const int minutesinqueue const int numpassengers const virtual int delay const O pure virtual must be redefine virtual void incrementminute virtual void assigntorunway int runwaynumber virtual TypeOfPlane type const O pure virtual must be r private PlaneId mid PlaneStatusType mstatus int mscheduledminute int mpassengers int minqueueminutes int mrunway 0 Functions that are common 7 at least have a common interface 7 are in Plane 0 Some of these functions are marked virtual which means that when they are rede ned by a derived class this new de nition will be used even for pointers to base class objects 0 Some of these virtual functions those Whose declarations are followed by O are pure virtual which means they must be rede ned in a derived class 7 Any class that has pure Virtual functions is called abstract 47Dbjects of abstract types niay not be created 44 only pointers to these objects niay be created 0 Functions that are speci c to a particular object type are declared in the derived class prototype o Hereisthe LandingPlane proUNype class LandingPlane public Plane public LandingPlane Planeld constamp id int scheduledminute int minutesuntilarrival int fuelminutesremaini int numpassengers int ongroundminute const int minutesuntilarrival const int fuelminutesremaining const void landplane int minute void crashplane int minute virtual int delay const virtual void incrementminute virtual void assigntorunway int runwaynumber virtual TypeOfPlane type const return LANDINGPLANE private int mlandedorcrashedminute int mminutesuntilarrival int mfuelminutesremaining A Polymorphic List of Plane Objects 0 Now instead of two separate lists of plane objects we can create one polyrnorphic 7 list std listlt Plane gt planes The pointers point to either LandingPlane or TakeoffPlane objects 0 Objects are constructed using new as in read in information and then Plane pptr new LandingPlane id scheduled untilarrival fuel passengers planespushback pptr read in more information and then pptr new TakeoffPlane id scheduled numpassengers planespushback pptr 0 Notice that the same pointer variable is used to point to objects of two different types 0 You could have also used LandingPlane and TakeoffPlane pointers and then pushed them onto the back of planes Accessing Objects Through a Polymorphic List of Pointers 0 Suppose you are iterating through the list for std listltPlanegt iterator i planesbegin iplanese std cout ltlt quotDelay quot ltlt i gtdelay ltlt stdendl Whose delay function is called 0 The answer depends on the type of plane object i is pointing to i If i points to a LandingPlane object then the function de ned in the LandingPlane class would be called i If i points to a TakeoffPlane object then the function de ned in the TakeoffPlane class would be called 7 This is an example of run time binding lmportantly if delay had not been declared Virtual then the function de ned in Plane would be called o If you want to use a function in LandingPlane such as fuelJninutesiremaining which is not declared in Plane then you must cast 7 the pointer for std listltPlanegt iterator i planesbegin iplanese std cout ltlt quotDelay quot ltlt i gtdelay ltlt std endl LandingPlane lp dynamiccastltLandingPlanegt i if lp std cout ltlt quotFuel units remaining quot ltlt lp gtfuelminutesremaining ltlt stdendl The pointer lp will be 0 if i is not a LandingPlane object 0 In short given a base class pointer p i A call p gtfoo when member function foo is declared Virtual will be a call to the de nition of foo provided in the derived class object p points to but only if the derived class rede nes foo i A call p gtfoo 7 when member function foo is not declared vi rtual will be a call to the de nition of foo provided in the base class even if the member function has overridden the de nition of foo Exercise What is the output of the following program include ltiostreamgt using namespace std class Base public Base virtual void A cout ltlt quotBase Anquot void B cout ltlt quotBase Bnquot class One public Base public 0ne void A cout ltlt quotOne Anquot void B cout ltlt quotOne Bnquot class Two public Base public Two void A cout ltlt quotTwo Anquot void B cout ltlt quotTwo Bnquot int main Base a3 a0 new Base a1 new One a2 new Two for unsigned int i0 ilt3 i ai gtA ai gtB return 0 Course Summary 0 Approach any problem by studying the requirements carefully playing with hand generated examples to understand them and then looking for analogous problems that you already know how to solve The standard library offers container classes and algorithms that simplify the programming process and raise your conceptual level of thinking in designing solutions to programming program 7 Just think how much harder some of the homework problems would have been without generic container classess When choosing between algorithms and between container classes data structures you should consider ef ciency naturalness of use and ease of programming All three are important Use classes with well designed public member functions to encapsulate sections of code 0 Writing your own container classes and data structures usually requires building linked structures and managing memory through the big three 7 copy constructor assignment operator and destructor Work hard to get these correct 0 When testing and debugging Test one function and one class at a time 7 Figure out what your program actually does not what you wanted it to do 7 Always nd the rst mistake in the flow of your program and x it before considering other apparent mistakes 7 Use small examples and boundary conditions when testing 20 0 Above all remember the excitement and satisfaction of developing a deep computational understanding of a problem and turning it into a program that realizes your understanding awlessly CSCI1200 Computer Science II Fall 2008 Lectures 10 85 11 Linked Lists Part I 85 II Review from Lecture 9 o Returning references to member variables from member functions 0 Review of iterators and iterator operations 0 STL Lists erase and insert on lists 0 Differences between indices and iterators differences between lists and vectors 0 Introductory linked lists amp operations on linked lists Stepping through a list amp Push back Today7s Double Lecture 0 Basic linked list operations continued Insert amp Remove 0 Common mistakes 0 Limitations of singlylinked lists 0 Doublylinked lists 7 Structure 7 Insert 7 Remove 0 Our own version of the STL 1istltTgt class named cs21ist 0 Implementing 1istltTgt iterator 111 Basic Mechanisms Inserting a Node 0 There are two parts to this nding the location where the insert must take place and doing the insert operation 0 We will ignore the nd for now We will also write only a code segment to understand the mechanism rather than writing a complete function 0 The insert operation itself requires that we have a pointer to the location before the insert location 0 If p is a pointer to this node and x holds the value to be inserted then the following code will do the insertion Draw a picture to illustrate what is happening NodeltTgt q new NodeltTgt create a new node q gt value x store x in this node q gt next p gt next make its successor be the current successor of p p gt next q make p s successor be this new node 0 Note This code will not work if you want to insert x in a new node at the front of the linked list Why not 112 Basic Mechanisms Removing a Node 0 There are two parts to this nding the node to be removed and doing the remove operation 0 The remove operation itself requires a pointer to the node before the node to be removed 0 Removing the rst node is an important special case 113 Exercise Remove a Node Suppose p points to a node that should be removed from a linked list7 q points to the node before 137 and head points to the rst node in the linked list Write code to remove p7 making sure that if p points to the rst node that head points to what was the second node and now is the rst after p is removed 114 Exercise List Copy Write a recursive function to copy all nodes in a linked list to form an new linked list of nodes with identical structure and values Here s the function prototype template ltclass Tgt void CopyAllNodeltTgt oldhead NodeltTgtamp newhead 39C 115 Basic Linked Lists Mechanisms Common Mistakes Here is a summary of common mistakes Read these carefully7 and read them again when you have problem that you need to solve o Allocating a new node to step through the linked list only a pointer variable is needed 0 Confusing the and the gt operators 0 Not setting the pointer from the last node to NULL 0 Not considering special cases of inserting removing at the beginning or the end of the linked list 0 Applying the delete operator to a node calling the operator on a pointer to the node before it is removed Delete should be done after all pointer manipulations are completed 0 Pointer manipulations that are out of order These can ruin the structure of the linked list 116 Implementing Our Own List Class 0 We will alter the structure of our linked list Nodes will be templated and have two pointers7 one going forward to the successor in the linked list and one going backward to the predecessor in the linked list We will have a pointer to the beginning and the end of the list template ltclass Tgt class Node public Node nextNULL prevNULL Nodeconst Tamp v valuev nextNULL prevNULL T value NodeltTgt next NodeltTgt prev o We7ll reimplement the mechanisms discussed today and we will de ne list iterators as a class inside a class 117 Limitations of SinglyLinked Lists 0 We can only move through it in one direction 0 We need a pointer to the node before the node that needs to be deleted 0 Appending a value at the end requires that we step through the entire list to reach the end 118 Generalizations of SinglyLinked Lists 0 Three common generalizations 7 Doublylinked allows forward and backward movement through the nodes 7 Circularly linked simpli es access to the tail7 when doublylinked 7 Dummy header node simpli es specialcase checks 0 Today we will explore and implement a doublylinked structure 119 The Structure of DoublyLinked Lists 0 For the next few examples7 we will use the simple node class class Node public int value Node next Node prev 0 Here is a picture of a doublylinked list holding 4 integer values head m 0 Note that we now assume that we have both a head pointer7 as before and a tail pointer variable7 which stores the address of the last node in the linked list 0 The tail pointer is not strictly necessary7 but it allows immediate access to the end of the list for ef cient pushback operations 1110 Inserting in the Middle of a DoublyLinked List 0 Suppose we want to insert a new node containing the value 15 following the node containing the value 1 We have a temporary pointer variable7 137 that stores the address of the node containing the value 1 Here7s a picture of the state of affairs head P tail o What must happen 7 The new node must be created7 using another temporary pointer variable to hold its address 7 lts two pointers must be assigned 7 Two pointers in the current linked list must be adjusted Which ones Assigning the pointers for the new node MUST occur before changing the pointers for the current linked list desl 0 At this point7 we are ignoring the possibility that the linked list is empty or that p points to the tail node 1 pointing to the head node doesn7t cause any problems 0 Exercise write the code as just described 1111 Removing from the Middle of a DoublyLinked List 0 Suppose now instead of inserting a value we want to remove the node pointed to by p the node whose address is stored in the pointer variable 13 0 Two pointers need to change before the node is deleted All of them can be accessed through the pointer variable pl 0 Exercise write this code 1112 Special Cases of Remove o If phead and ptai17 the single node in the list must be removed and both the head and tail pointer variables must be assigned the value NULL o If phead or ptai17 then the pointer adjustment code we just wrote needs to be specialized to removing the rst or last no e o All of these will be built into the erase function that we write as part of our cs21ist class 1113 The cs2list Class 7 Overview 0 We will write a templated class called cs21ist that implements much of the functionality of the std 1istltTgt container and uses a doublylinked list as its internal lowlevel data structure 0 Three classes are involved 7 The node class 7 The iterator class 7 The cs21ist class itself 0 Below is a basic diagram showing how these three classes are related to each other cstZLi stlt oatgt Nodelt oatgt head 39 Nodelt oatgt tail int size 1i stiteratorlt oatgt Nodelt oatgt ptr oat value 314 Nodelt oatgt next Nodelt oatgt prev NULL oat value 602 Nodelt oatgt next Nodelt oatgt prev I oat value 161 Nodelt oatgt next NULL Nodelt oatgt prev I o For each list object created by a program7 we have one instance of the cs21ist class7 and multiple instances of the Node For each iterator variable of type cleistltTgt iterator that is used in the program7 we create an instance of the 1istiterator class 1114 The Node Class o It is ok to make all members public because individual nodes are never seen outside the list class 0 Note that the constructors all initialize the pointers to NULL template ltclass Tgt Node nextNULL prevNULL Node const Tamp v valuev nextNULL prevNULL T value NodeltTgt next NodeltTgt prev 1115 The Iterator Class 7 Desired Functionality o Increment and decrement operators Will be operations on pointers o Dereferencing to access contents of a node in a list 0 Two comparison operations operator and operator 1116 The Iterator Class 7 Implementation 0 See attached code 0 Separate class 0 Stores a pointer to a node in a linked list 0 Constructors initialize the pointer 7 they Will be called from the cs21ist ltTgt class member functions 7 cs21istltTgt is a friend class to allow access to the pointer for cs21istltTgt member functions such as erase and insert 0 operator dereferences the pointer and gives access to the contents of a node 0 Stepping through the chain of the linkedlist is implemented by the increment and decrement operators 0 operator and operator are de ned7 but no other comparison operators are allowed 1117 The cs2list Class 7 Overview 0 Manages the actions of the iterator and node classes 0 Maintains the head and tail pointers and the size of the list 0 Manages the overall structure of the class through member functions 0 Three member variables head7 tai17 size 0 Typedef for the iterator name 0 Prototypes for member functions7 Which are equivalent to the std 1istltTgt member functions 0 Some things are missing7 most notably constiterator and reverseiterator 1118 The cs2list class 7 Implementation Details 0 Many short functions are in lined o Clearly7 it must contain the big 3 copy constructor7 operator7 and destructor The details of these are realized through the private copy1ist and destroy1ist member functions 1119 Exercises 1 Write cs21istltTgt pushfront 2 Write cs21istltTgt erase 100407 152805 cleisth ifndef cszlistghg deflne cszlist h friend class cs211stltTgt q q E H m39 M o e m M q o M e m t o o m c e e o 1 e 1 Q d e m M q o M m c e Equot M c 1 H o 1 M Comparions operators are straightforward separate classes are defined a Node class an iterator class and friend 13001 operatorconst listgiteratorltTgt8lt 1 const listgiteratorltTgt8lt r the actual list class The underlying list is doublyelinked hut return lvptrg reptrg there is no dummy head node and the list is not circularv friend 13001 operatorlccnst listgiteratorltTgt8lt 1 const listgiteratorltTgt8lt r return lvptrg l reptrg NODE CLASS private template ltclass Tgt REPRESENTATION class Node NodeltTgt ptrg ptr to node in the list Node nextJNULL prevJNULL Nodeltconst Tamp v value4v nextJNULL prevJNULL REPRESENTATION LIST CLASS DECLARATION T valueg Note that it explicitly maintains the Size of the list NodeltTgt nextg template ltclass Tgt NodeltTgt prevg class cleist 39 cs21ist headJNULL tallANULL sizeJo A quotforward declarationquot of this class is needed cs21istconst cleistltTgtamp old thisegtcopyglistoldi template ltclass Tgt class cleist cszlisto thisegtdestroy4115ti cleistamp operator cons cleistltTgtamp old LIST ITERATOR int size const return SlZeA template ltclass Tgt bool empty const return head a NULL class listgiterator void clear thlsegtdestroy4115t public listgiteratoro ptr4NULL H void pushgfrontmonst Tamp v listgiteratorN0deltTgt p ptr4p void popgfrontO listgiteratorlistgiteratorltTgt constamp old ptr4oldvptr4 void pushgbackmonst Tamp v listgiteratoro void popgbacko listgiteratorltTgt amp operatorconst listgiteratorltTgt amp old const Tamp fronto const return headgtvalue4 ptrg oldvptrg return thls Tamp front return headgtvalue4 const Tamp back const return tailgtvalue4 dereferencing operator gives access to the value at the pointer Tamp back return tailgtvalue4 Tamp operator return ptrgtvalue4 typedef listgiteratorltTgt iterator increment 9 decrement operators iterator eraseiterator itr listgiteratorltTgt amp operator iterator insertltiterator itr T constamp v ptrg ptr44gtnext4 iterator begin return iteratorhead4 return thls iterator end return iteratorNULL listgiteratorltTgt operatorltint private listgiteratorltTgt tempth1s void copylistcleistltTgt const amp old ptrg ptr44gtnext4 void destroygllstO return temp REPRESENTATION listgiteratorltTgt amp operator NodeltTgt head ptrg ptr44gtprev4 NodeltTgt tail return thls int 51264 listgiteratorltTgt operatorltint llStglteratorltTgt tampth15 ptrg ptrgtprev return temp 100407 152805 LIST CLASS IMPLEMENTATION template ltclass Tgt clelstltTgtamp cs21lstltTgtz operator if ampold i thls th1S4gtdeStroy411SE0 thlsegtcopy411SE old return thl S template ltclass Tgt void clelstltTgtz pushgbackmonst Tamp v template ltclass Tgt void clelstltTgtz pushgfrontmonst Tamp v template ltclass Tgt void clelstltTgtz popgbaCkO template ltclass Tgt void CSleSEltTgt11pOp4frODE0 template ltclass Tgt bool operatorcs211stltTgtamp 1ft cszllstltTgtamp rgt m N H m u u H u quota rgtltr return t rue template ltclass Tgt bool operatorlclelstltTgtamp 1ft clelstltTgtamp rgt return lt lt rgtvslzeo return false Tgtzzlterator lftgltr IfEVbeglho Tgtzzlterator rgtgltr rgtvbeglho 1ftvend rgtgltr return false const CS211SEltTgtamp old cleisth template ltclass Tgt template ltclass Tgt template ltclass Tgt template ltclass Tgt void clelstltTgtzdestroy4115t endif typename cs211stltTgtzz1terator clelstltTgtzerase1terator ltr typename cs211stltTgtzz1terator cs211stltTgtz1nsert1terator ltr void clelstltTgtzcopy4115tcs211stltTgt const amp old T constamp v


Buy Material

Are you sure you want to buy this material for

25 Karma

Buy Material

BOOM! Enjoy Your Free Notes!

We've added these Notes to your profile, click here to view them now.


You're already Subscribed!

Looks like you've already subscribed to StudySoup, you won't need to purchase another subscription to get this material. To access this material simply click 'View Full Document'

Why people love StudySoup

Jim McGreen Ohio University

"Knowing I can count on the Elite Notetaker in my class allows me to focus on what the professor is saying instead of just scribbling notes the whole time and falling behind."

Jennifer McGill UCSF Med School

"Selling my MCAT study guides and notes has been a great source of side revenue while I'm in school. Some months I'm making over $500! Plus, it makes me happy knowing that I'm helping future med students with their MCAT."

Steve Martinelli UC Los Angeles

"There's no way I would have passed my Organic Chemistry class this semester without the notes and study guides I got from StudySoup."


"Their 'Elite Notetakers' are making over $1,200/month in sales by creating high quality content that helps their classmates in a time of need."

Become an Elite Notetaker and start selling your notes online!

Refund Policy


All subscriptions to StudySoup are paid in full at the time of subscribing. To change your credit card information or to cancel your subscription, go to "Edit Settings". All credit card information will be available there. If you should decide to cancel your subscription, it will continue to be valid until the next payment period, as all payments for the current period were made in advance. For special circumstances, please email


StudySoup has more than 1 million course-specific study resources to help students study smarter. If you’re having trouble finding what you’re looking for, our customer support team can help you find what you need! Feel free to contact them here:

Recurring Subscriptions: If you have canceled your recurring subscription on the day of renewal and have not downloaded any documents, you may request a refund by submitting an email to

Satisfaction Guarantee: If you’re not satisfied with your subscription, you can contact us for further help. Contact must be made within 3 business days of your subscription purchase and your refund request will be subject for review.

Please Note: Refunds can never be provided more than 30 days after the initial purchase date regardless of your activity on the site.