Question: help me in this java project and i want just use import java.util.Scanner; Video: - Create multiple video objects with different ids and attributes, then

 help me in this java project and i want just useimport java.util.Scanner; Video: - Create multiple video objects with different ids andattributes, then test equals method between them Playlist: - Create two playlistobjects one shared the other not - Add videos to them -

help me in this java project and i want just use import java.util.Scanner;

Video: - Create multiple video objects with different ids and attributes, then test equals method between them Playlist: - Create two playlist objects one shared the other not - Add videos to them - Try to add the same video twice - Try to add a video when the playlist is full - Remove a video that exists - Try to remove a video that doesn't exist - Count videos of a certain category - Print the playlisy - sort the playlist, print to see the results - modify the shared status of a playlist - test equals method on the playlists

Channel: - Create a channel - Add playlists to it - Try to add a playlist twice - Try to add a playlist when the channel is full - Delete a playlisy that exists - Try to delete a playlist that doesn't exist - Flip the shared status of a playlist that exists then print to check if it works - Try to flip the shared status of a playlist that doesn't exist - Get a playlist with the most category of your choice and print to check if it's the correct one - print the channel and its playlists - Sort all playlist then print to check if it works

Playlist Channel - name : String - shared : boolean - name : String - playlists + Channel(name : String, size : int) + addPlaylist(p: Playlist) : boolean + deletePlaylist(p: Playlist) : boolean + flipSharedStatusOf(p: Playlist) : boolean + getPlaylist(category : Category): Playlist + sortPlaylists(): void + toString(): String + Playlist + Playlist(name : String, shared : boolean, size : int) + addVideo(v: Video): boolean + removeVideo(v: Video): boolean + countVideosOf(category : Category): int + sortOnDuration : void + getName(): String + is Sharedo : boolean + setShared(shared : boolean) : void + equals(obj: Object): boolean + toString : String 1 videos Video > Category COMEDY EDUCATION ENTERTAINMENT SPORTS OTHER id : int -title: String - duration: int - category : Category + Video(id:int, title: String, duration : int, category : Category) + getDuration(): int + getCategory(): Category + equals(obj : Object): boolean + toString0 : String Video Class: Attributes: o id: the ID of the video o title: the title of the video o duration: the duration of the video in seconds o category: the category of the video Methods: o Video(id:int, title:String, duration:int, category:Category): constructor o getDuration(): returns the duration in seconds of the video o getCategory(): returns the category of the video o equals(obj:Object): compares two objects of type Video based on their id and returns the result of the equality o toString(): this method returns a string representation of the video Playlist Class: Attributes: o name: the name of the playlist o shared: the sharing status of the playlist; true if it's public and false if it's private Methods: o Playlist(): default constructor for an empty playlist o Playlist(name:String, shared:boolean, size:int): constructor o addVideo(v:Video): adds a video to the playlist if there's space and the video wasn't added before o remove Video(v:Video): removes a video from the playlist if it's there while maintaining the order of the playlist o countVideosOf(category:Category): returns the number of videos of a certain category currently in the playlist o sortOnDuration(): sorts the videos in the playlist ascendingly based on the duration o getName(): returns the name of the playlist o isShared(): returns the shared status of the playlist osetShared(shared:boolean): sets the value of the shared status of the playlist o equals(obj:Object): compares two objects of type Playlist based on their name and returns the result of the equality o toString(): this method returns a string representation of the playlist Channel Class: Attributes: o name: the name of the channel Methods: o Channel(name:String, size:int): constructor o addPlaylist(p:Playlist): adds a playlist to the channel if there's space and the playlist wasn't added before o delete Playlist(p:Playlist): removes a playlist from the channel if it's there by replacing it with the last playlist in the channel o flipSharedStatusOf(p:Playlist): flips the shared status of a playlist if it's there in channel o getPlaylist(category:Category): returns the playlist in the channel having the most videos of a certain category if possible o sortPlaylists(): sorts all videos in each playlist in the channel ascendingly based on duration o toString(): this method returns a string representation of the channel Exercise 1: Write the previous classes. Exercise 2: Write a main method that tests the functionalities of the previous classes

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!