Answered step by step
Verified Expert Solution
Question
1 Approved Answer
In order to have a common ground for coding, testing and evaluation, the main UML class diagram of the business logic is given above. You
In order to have a common ground for coding, testing and evaluation, the main UML class diagram of the
business logic is given above. You may need to extract hidden information from the schema and add
necessary code while implementing your project. Dont forget to handle multithreading issues. You are
required to add a graphical user interface and unit tests. Here are some details about the business logic:
Problem Domain: You are writing software for a distributor company that sells journals to subscribers.
Individuals pay for their subscription by credit card and corporations pay by bank cheques. A subscriber
can pay in partial amounts; therefore the payment that has been received so far is kept in a PaymentInfo
object. A subscriber can subscribe to multiple copies of the same journal. A subscription continues for one
year but it can begin in any month. For example, a subscription may begin in March and this means
that it will end in February inclusive The ISSN is a unique identifier of a journal. The frequency of
a journal denotes how many issues are published within a year. Each journal has an issue price but
subscribers can be granted a discount ratio.
Additional Information:
addSubscription method: A subscription for a nonexistent subscriber or journal must not be created.
If a subscription object for the given subscriber and journal exists, its copies field will be increased by
one in this method.
listAllSendingOrders method: Lists which journals will be sent to which subscribers for a given month
and year. We must not send journals that have not been paid for. You can use the result of the
canSend method for this purpose.
canSend method: Determines whether a particular issue of its journal can be sent to its subscriber. If
enough payment has been received so far, the method returns true. The acceptPayment method
does not interact with a subscriber; it just increases the received payment so far.
saveState and loadState methods: These methods accept a file name and executes their namesake
tasks on entire objects. They should wait for the report method to complete its tasks if it is running.
report method: This should be run as a multithreaded task run in a separate thread than the
application and it generates a report that preferably includes some charts about the items given
below. Its output can be displayed in the GUI or it can be forwarded to an external HTML file.
o Subscriptions that will be expired after a given date.
o Received annual payments in a given year range.
What you are expected to do:
You shall implement all the classes given in the UML class diagram.
You need to add GUI functionality to your project.
You are required to add unit tests to your project, too. There must be at least two jUnit test cases for
each class depicted as having member fields in the main UML class diagram.
This is my assigment above can an expert give me functioning Distribrutor class?
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started