Java Methods Design and Implementation
/* This method will add the particular package to the DTHService only if the package is not present in the DTHService and return true. Otherwise return false */
/* This method will check if the particular channel is present in the existing list of packages in the DTHServices and if found ,then need to return channel details .Otherwise need to throw an exception- ChannelNotFoundException in the below format “The given channel is not found”
/* This method will add the given channel to the given package only if the totalChannels tagged to that package is less than 5.And hence return “The channel ---- is tagged to the package....”/.
Otherwise display the message like “The channel cannot be tagged ”
/* This method will return all the channels whose rating is greater than the given rating and the ownerId is divisble by 2*/
/*This method will find the maximum cost of the channel present in the DTHServices */
via email: mhassnainjamil@gmail.com
via WhatsApp: +92-324-7042178
via skype: hassnainjamil1
+findChannel(int channelId) throws ChannelNotFoundException:Channel
/* This method will check if the particular channel is present in the existing list of packages in the DTHServices and if found ,then need to return channel details .Otherwise need to throw an exception- ChannelNotFoundException in the below format “The given channel is not found”
+tagChannelToPackage(Package p,Channel c):String
/* This method will add the given channel to the given package only if the totalChannels tagged to that package is less than 5.And hence return “The channel ---- is tagged to the package....”/.
Otherwise display the message like “The channel cannot be tagged ”
+findChannelRating(float rating):ArrayList<Channel>
/* This method will return all the channels whose rating is greater than the given rating and the ownerId is divisble by 2*/
+calculateTotalCost(Package p):double
- For the Special Package :->totalCost will be the total cost of the channels tagged to the package-additional rate
- For the Normal Package :->totalCost will be the total cost of the channels tagged to the package-discount
Optional Methods
+findMaxChannelCost():double/*This method will find the maximum cost of the channel present in the DTHServices */
CONTACT DETAILS
For any other questions or other tasks please feel free to contact mevia email: mhassnainjamil@gmail.com
via WhatsApp: +92-324-7042178
via skype: hassnainjamil1
Comments
Post a Comment