Use of an Interface The interface declares a method called salesSummary(); Use of an abstract classa. A constructor that initializes int rowSum int colSum b. Implements the salesSummary(). The salesSummary() method will declare two arrays as follows: o a multidimensional array named artistSales using below information: o a one-dimensional array named artistNames using below information: c. The salesSummary() method should calculate the total of each column in the artistSales array and display a combined (artistSales and artistNames) table with the names and sales as shown in Table 1. Use of a subclassa. A constructor that initializes int index b. Override the abstract constructor c. Override the salesSummary() method from the abstract class d. Overload the salesSummary(int artistPosition):
Use of an Interface
The interface declares a method called salesSummary();
Use of an abstract classa.
A constructor that initializes
int rowSum
int colSum
b. Implements the salesSummary(). The salesSummary() method will declare two
arrays as follows:
o a multidimensional array named artistSales using below information:
o a one-dimensional array named artistNames using below information:
c. The salesSummary() method should calculate the total of each column in the artistSales array
and display a combined (artistSales and artistNames) table with the names and
sales as shown in Table 1.
Use of a subclassa. A constructor that initializes
int index
b. Override the abstract constructor
c. Override the salesSummary() method from the abstract class
d. Overload the salesSummary(int artistPosition):
This method will allow the user to search for a specific artist and display the
below information:
Artist Name
Artist CD sale
Artist DVD Sale
Artist Blue Rale Sale
Artist total of CD, DVD, and Blue Rale Sale .
e. The salesSummary(int artistPosition) will make use of a sentinel value to ensure that
the user only enter a value between 1 and 5.
If the user enter a number
greater than 5 the user should be notify and be given another chance to try
again. Further, after 6 attempts the
f. The salesSummary(int artistPosition) method will make use of a switch case to get the
artist Position.
g. The salesSummary(int artistPosition) method will also ensure that if the user enter a
negative value the program should stop.
Use of a main class ArtistSearchOopThe main class ArtistSearchOop will make use of a Scanner class to receive the artist position
to be searched. This class will have declared an Upcasted object to be used to invoke the
two methods (salesSummary() and salesSummary(int artistPosition). This class will make use of
Exception handling to ensure that the flow of the program doesn't break when an
exception occur
Scenario
You have been tasked to create program named "artistSearchOop" that will allow a user to search for an artist from a table and display the artist information including the Artist name, the artist DVD sale, the artist CD sale, the artist Blu Ray Sale, and the total sale for that specific Artist. You have been given Table 1 which represents the Sales Summary of artists sales
Image transcription text
500000 2. DJ B Coffee 700000 500000 500000 3. Bruno Mars 800000 100000 50000 4. F Fighters
100000 200000 200000 5. T Swift 300000 100000 50000 Total 2800000 1700000 1300000
Step by step
Solved in 3 steps with 1 images