Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.*;
- public class Streamer {
- // Variables
- String name;
- String nameOfChannel;
- String nationality;
- int age;
- ArrayList <Bot> botsList;
- ArrayList <String> socials;
- // Constructors
- Streamer(){
- name = "";
- nameOfChannel = "";
- nationality = "";
- age = 0;
- botsList = new ArrayList <Bot> ();
- socials = new ArrayList <String> ();
- }
- Streamer(String name, String nameOfChannel, String nationality, int age){
- this.name = name;
- this.nameOfChannel = nameOfChannel;
- this.nationality = nationality;
- this.age = age;
- this.botsList = new ArrayList <Bot> ();
- this.socials = new ArrayList <String> ();
- }
- Streamer(String name, String nameOfChannel, String nationality, int age, ArrayList <String> socials){
- this.name = name;
- this.nameOfChannel = nameOfChannel;
- this.nationality = nationality;
- this.age = age;
- this.botsList = new ArrayList <Bot> ();
- this.socials = socials;
- }
- // Methods
- void showStatus(){
- System.out.println("*********************************");
- System.out.println("Name of streamer: " + name);
- System.out.println("Name of channel:" + nameOfChannel);
- System.out.println("Nationality: " + nationality);
- System.out.println("Age of streamer:" + age);
- System.out.println();
- System.out.println("BotsList of streamer " + name + ": ");
- if(botsList.size() != 0){
- for(int i=0; i<botsList.size(); i++){
- System.out.println("Bot " + (i+1) + ": " + botsList.get(i).name);
- }
- }
- else{
- System.out.println("No bots yet in channel " + nameOfChannel);
- }
- System.out.println("Socials of streamer " + name + ": ");
- if(socials.size() != 0) {
- for(int i=0; i<socials.size(); i++) {
- System.out.println(socials.get(i));
- }
- }
- else {
- System.out.println("No socials for streamer " + name + " given in this channel: " + nameOfChannel);
- }
- System.out.println("*********************************");
- } // END OF SHOWSTATUS FUNCTION
- void showSocials() {
- System.out.println("Socials of streamer '" + name + "' (channel " + nameOfChannel + "): ");
- if(socials.size() != 0) {
- for(int i=0; i<socials.size(); i++) {
- System.out.println(socials.get(i));
- }
- }
- else {
- System.out.println("No socials for streamer " + name + " given in this channel: " + nameOfChannel);
- }
- }
- } // END OF CLASS STREAMER
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement