Given the following superclass named Advertising and subclasses named television and socialbestia Superclass Advertising
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am
Given the following superclass named Advertising and subclasses named television and socialbestia Superclass Advertising
Given the following superclass named Advertising and subclasses named television and socialbestia Superclass Advertising Albu Methods Subclass Attributes String on the company to advertise product string TYRE//s.: book, fashion, cosmetic :default and normal constructor, mutators, accessors, ai abstract double calculatecoat Subclass Attributes Methods Television int ducation in seconds baisan Rinalet true for prime slot Methods :default and normal constructor, mutators, accessors, Social public double calculatoa to calculate the cost of advertising SocialMedia string sedia //Tacebook, Instagram, Twitter String cateanry//reter to Table 3, based on //eedia type :default and normal constructor, mutators, accessor. public double calculatetaat): a) Wete a full program to define all classes involved. The definition of method calculategat) for both subclasses that calculate and return the advertising cost are using the following information For television advertisement, the cost will be calculated based on the duration and time slot as shown in Table 1. Table 1: Television advertisement Duration Cost (RM) 5 seconds 7 seconds 10 seconds The company should pay additional charge RM100 for the prime-time slot advertising For social media advertisement, the cost that will be charged depends on the social media type as shown in Table 2. туре Facebook Instagram Twitter 125 150 180 Table 2 Social Media advertising Cost (RM) 200 180 However, the additional charge is different according to category of social media as shown in Table 3 Table 3: Social Media Advertising Category Category Post Story Live Social media Facebook Instagram Additional Cost (RM) 50 40 Twitter 30 40 30 20 Tweet Re-tweet Fleet b) Write a full application program that can perform the following: Declare an array of 100 objects for the Advertising class 1. Using any sentinel loop format, read all attributes to be stored in array Count and display the number of advertisings using television and social media v. Display the company name and the cost that should be paid by each company that advertise their product on television. v. Calculate and display the total cost for live slot on Facebook v. Determine the most popular social media type is used for advertisement **Please consider the invalid input that might be entered by the user, if necessary, in certain part Show A screenshot of diagram that shows the relationship of the classes involved. Source codes for each class. A sample of UO.