1. Creating an Influencer from Different Platforms by Codechum Admin Year 2020 - the sprout of online influencers in every platform available out there. Online influencers, most especially the successful ones are super talented because they're taking advantage of the opportunity that is available at hand. For this program, we will be modeling these influencers.   First, implement an abstract class called Influencer. This class will have the following properties:  private String name  private String platform - this can only be either "Facebook" or "Tiktok"    Then, it will have the following methods:  its constructor which accepts the name and platform. If the platform supplied is not "Facebook" or "Tiktok", set the platform to "Facebook" by default instead.  toString() - returns the following string: "I'm {name} an influencer at {platform}" abstract void doLiveStream()    Then, implement the FacebookInfluencer class which inherits from the Influencer class. This class will have no additional properties and will have the following methods:  its constructor which accepts a name only. It will then call its parent class' constructor and pass the name supplied as well as the string "Facebook" as the platform  an override of the doLiveStream() method. This method will simply print the message "Doing livestream on Facebook, please send stars" with a new line at the end   Finally, implement the TiktokInfluencer class which also inherits from the Influencer class. This will also have no additional properties and will have the following methods: its constructor which accepts a name only. It will then call its parent class' constructor and pass the name supplied as well as the string "Tiktok" as the platform an override of the doLiveStream() method. This method will simply print the message "Doing livestream on Tiktok, please send love" with a new line at the end   In the main, ask the user to select which type of influencer they want to create (1 - Facebook Influencer, 2 - Tiktok Influencer).   Then, ask the user to input the name of the influencer. Basing on these inputs, create the appropriate Influencer object named influencer.   Finally, before you submit your code, uncomment the Tester code line. Sample Output 1 Select Influencer (1 - Facebook, 2 - Tiktok): 1 Enter name of influencer: Rich Isog Enter code: 1 SUCCESS Sample Output 2 Select Influencer (1 - Facebook, 2 - Tiktok): 2 Enter name of influencer: Bella Poarch Enter code: 2 SUCCESS Sample Output 3 Select Influencer (1 - Facebook, 2 - Tiktok): 1 Enter name of influencer: Messi Enter code: 3 SUCCESS

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

1. Creating an Influencer from Different Platforms

by Codechum Admin

Year 2020 - the sprout of online influencers in every platform available out there. Online influencers, most especially the successful ones are super talented because they're taking advantage of the opportunity that is available at hand. For this program, we will be modeling these influencers.

 

First, implement an abstract class called Influencer. This class will have the following properties: 

  • private String name 
  • private String platform - this can only be either "Facebook" or "Tiktok" 

 

Then, it will have the following methods: 

  • its constructor which accepts the name and platform. If the platform supplied is not "Facebook" or "Tiktok", set the platform to "Facebook" by default instead. 
  • toString() - returns the following string: "I'm {name} an influencer at {platform}"
  • abstract void doLiveStream() 

 

Then, implement the FacebookInfluencer class which inherits from the Influencer class. This class will have no additional properties and will have the following methods: 

  • its constructor which accepts a name only. It will then call its parent class' constructor and pass the name supplied as well as the string "Facebook" as the platform 
  • an override of the doLiveStream() method. This method will simply print the message "Doing livestream on Facebook, please send stars" with a new line at the end

 

Finally, implement the TiktokInfluencer class which also inherits from the Influencer class. This will also have no additional properties and will have the following methods:

  • its constructor which accepts a name only. It will then call its parent class' constructor and pass the name supplied as well as the string "Tiktok" as the platform
  • an override of the doLiveStream() method. This method will simply print the message "Doing livestream on Tiktok, please send love" with a new line at the end

 

In the main, ask the user to select which type of influencer they want to create (1 - Facebook Influencer, 2 - Tiktok Influencer).

 

Then, ask the user to input the name of the influencer. Basing on these inputs, create the appropriate Influencer object named influencer.

 

Finally, before you submit your code, uncomment the Tester code line.

Sample Output 1

Select Influencer (1 - Facebook, 2 - Tiktok): 1 Enter name of influencer: Rich Isog Enter code: 1 SUCCESS

Sample Output 2

Select Influencer (1 - Facebook, 2 - Tiktok): 2 Enter name of influencer: Bella Poarch Enter code: 2 SUCCESS

Sample Output 3

Select Influencer (1 - Facebook, 2 - Tiktok): 1 Enter name of influencer: Messi Enter code: 3 SUCCESS
Expert Solution
steps

Step by step

Solved in 5 steps with 2 images

Blurred answer
Knowledge Booster
Software Development
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education