MainMenu class has a zero- to- one, i.e. direct relationship to MagazineMenu and SubscriptionMenu classes.
MagazinesMenu also has zero- to- one relationship to SubscriptionMenu Class.
MagazinesMenu and SubscriptionMenu class has a zero-to-many relationship to Magazine and Subscription class as subscription can be for any number of magazines, so it has zero-to-many relationship.
Subscription class is directly linked to the Magazine class as it has zero-to-one relationship between them.
Classes
- FileHandler
- Fields
- outByteStream – FileOutputStream
- OOStream – ObjectOutputStream
- inByteStream – FileInputStream
- OIStream – ObjectInputStream
- aFile – File
- Methods
- FileHandler()
- getPath()
- isFileEmpty()
- saveToFile(Subscription[])
- loadFromFile()
- Description
- This class is created to get the file and check if the file is empty or not. If not then save the subscription to the file
- Magazine
- Fields
- serialVersionUID – long
- category – string
- price – double
- Methods
- Magazine(string, string, double)
- getCategory()
- setCategory(string)
- getTitle()
- setTitle(string)
- getPrice()
- setPrice(double)
- toString()
- MagInfo()
- compareTo(Magazine)
- Description
- This is an info class for object “Magazine”. This class has all the information related to the magazine like getting the magazine category, price, etc
- Subscription
- Fields
- serialVersionUID – long
- expirationMonth – int
- expirationYear – int
- cardNumber – long
- cvc – int
- country – string
- Methods
- SubscriptionMenu(List<Magazine> magazines,List<Subscription> subscriptions)
- getOption()
- addSubscription(Magazine, string, string, string, string, string, string, string)
- addSubscription(Magazine)
- modifySubscription()
- deleteSubscription()
- findSubscription(Subscription)
- insertSubscription(Subscription)
- Description
- This class is created for all the subscription information of a user like name of subscription, expiration of subscription, name and address of user or subscriber etc.
- InvalidCardNumberException
- Fields
- serialVersionUID – long
- Methods
- InvalidCardNumberException(string)
- Description
- This class is created to handle the invalid card number error.
- InvalidCVCException
- Fields
- serialVersionUID – long
- Methods
- InvalidCVCException(string)
- Description
- This class is created to handle the invalid CVC error.
- InvalidExpirationException
- Fields
- serialVersionUID – long
- Description
- This class is created to handle the invalid expiration error.
- Methods
- InvalidExpirationException(string)
- InvalidNameException
- Fields
- serialVersionUID – long
- Methods
- InvalidNameException(string)
- Description
- This class is created to handle the invalid name error.
- MagazinesMenu
- Fields
- myIcon – icon
- addIcons – icon[]
- lastAdIcon – int
- rng – Random
- dropDownList -- JComboBox<String>
- message – object[]
- Methods
- MagazinesMenu(List<Magazine>, List<Subscription>)
- getOption()
- browse()
- advertisement()
- Description
- This class is created to handle the menu of magazine.
- MainMenu
- Fields
- myIcon – Icon
- dropDownList -- JComboBox<String>
- message – object[]
- Methods
- MainMenu(MagazinesMenu, SubscriptionMenu)
- getOption()
- Description
- This class is created to handle the main menu of the application.
- SubscriptionMenu
- Fields
- myIcon – Icon
- dropDownList -- JComboBox<String>
- dropDownMagazines -- JComboBox<String>
- message – object[]
- Methods
- SubscriptionMenu(List<Magazine>, List<Subscription>)
- getOption()
- addSubscription(Magazine, string, string, string, string, string, string, string)
- addSubscription(Magazine)
- modifySubscription()
- deleteSubscription()
- findSubscription(Subscription)
- insertSubscription(Subscription)
- Description
- This class handles the subscription menu and contains methods to add, modify, delete and find subscription.
- MagazineSubscriptionApp
- Methods
- MagazineSubscriptionApp()
- Main(String[])
- Description
- This is the main class created for this application which will run every time the application is started. This is like a console application.