“WeCode” is a small rising software development company that provides novel softwaresolutions mainly using Java technologies. After several initial discussions, WeCode has been hiredby “PlayASong”...

“WeCode” is a small rising software development company that provides novel softwaresolutions mainly using Java technologies. After several initial discussions, WeCode has been hiredby “PlayASong” music label to automate their processes and be more effective when serving itscustomers. As an initiative, PlayASong wants a standalone application that can handle basicfunctionalities within the office. After some brainstorming session between the two companies,they have agreed upon the below set of functionalities to be delivered.Description of functionalitiesThere are two main User categories in the system, namely “Operators” and “Artists”.All Users are registered in the system using their name and email when they enter the system forthe first time.Artists can be registered by providing their name, email, music genre (like classical, jazz, rock,pop, techno, disco, etc..), the number of songs intended to be included and his song list. A songlist has the song name and the rate of the song (pricing).Operators are the employees of PlayASong. Other than the name and the email, they are requiredto provide their employee number and the job title when registering initially.User class has a “printDetails” method to display user information. Yet, the details to print shouldvary based on the type of the user (e.g., an operator will be printing his name, email, employeenumber and the job title whereas an artist will be showing name, email, music genre, the numberof songs and his song list).An Artist can have a list of up to 5 songs. Songs are stored in a 2D array where song name andsong rate are taken as keyboard inputs. Artist class needs to implement a method using arrays tostore song details and display those.The company operator will be manually adding the song(s) file(s) to the system when the artistbrought the song(s) file(s) in a physical device like a USB drive.It was decided to generate an interface called “Calculations” to be responsible all sorts ofcalculations that the company must handle. Initially it has only “calculateRevenue” method whichtakes an Artist object as an argument.Operators calculate the revenue for each artist. Already created Artist objects have their song listand the respective rates. Since each song has a different rate, PlayASong company has a policyto consider the average rate of each artist for revenue calculation. Hence, the revenue is themultiplication of number of downloads and average song rate. Number of downloads is enteredby the operator as a keyboard input.Tasks• Implement the above scenario using appropriate classes, methods and object orientedprogramming concepts like inheritance, overloading, abstract classes, interfaces, etc..Your code needs to be error-proof and clear.• Implement a constructor in the User class to initialize the data members: name and email• Overload this User constructor to take a User object as a parameter and initialize values• Implement constructors for the Artist and Operator classes to initialize data membersOperator class should implemented a method to calculate revenue for each artist usingthe interface “Calculations”.• You need to handle the exceptions that may occur when reading keyboard inputs; e.g.,when entering song details, only strings are expected and though song rate is a string, itneeds to be in correct format since that value is used to calculate revenue later.Furthermore, accessing an array element may cause exceptions too.• Create a public class called “PlayASong” with the main method and generate the followingoutputs using appropriate objects, constructors and method invocation.❖ Song details are entered to the system iteratively.❖ Then artist’s details and his song list with respective rates are displayed.❖ Operators details along with the revenue gained need to be displayed as given below.Also, prepare a report indicating different outputs retrieved when executing above listed tasksand functionalities.Mark DistributionSource Code Description MarkCorrect Application of OOP 05 marksUsage of keywords 05 marksApply polymorphism, usage of interfaces 05 marksConstructor implementation & overloading 10 marksKeyboard Inputs 05 marksException Handling 10 marksArray manipulations 10 marksCorrect Calculations 20 marksDisplaying details 15 marksCompile, Following Coding standards, Overall completeness 05 marksReport 10 marks
Mar 30, 2021
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here