Implement An Object-Oriented Program Using Java

Implement An Object-Oriented Program Using Java

Implement An Object-Oriented Program Using Java

Programming Assignment Help

At Programming Homework Tutors, we believe in providing our students with practical, real-world examples of how to apply the concepts they learn in class. That’s why we’ve developed a variety of sample projects to help you see how our courses can be used to create impactful solutions in your field of study.

 

Specification

The program will keep track of up to 3 albums, and up to 4 songs each album. Each song has the following information: name, artist, duration (in seconds), and genre (can be only “rock”, “pop”, “hip-hop”, or “bossa nova”). Each album will have a name and up to 4 songs. In program requirements you will find more details.

When run, the program will display a menu of actions to the user, including one that exits the program. until the user chooses to exit, the menu is displayed again after each action is completed.

The program should have the following functionalities:

Will allow the user to create albums

Will allow the user to enter a new SOrW into an album

Will prevent the user from adding a song in an album if exceeds a time limit of 20min (including all songs).

Will allow the user to request the list of all songs (and the details of each song) from an album.

Will allow the user to request a list of all albums (including all the songs in each album).

Will allow the user to request a list of all songs whose duration is under a certain time (in minutes).

Will allow the user to request a list of all songs of a specific genre.

Will allow the user to delete an album.

Will allow the user to delete a song from an album.

Your program must give appropriate messages to the user on an attempt to:

create an album that already exist (two albums are identical if they have the same name) create another album when there is no room anymore.

add a song to an album that is full OR exceed a time limit OR in an album that does not exist.

add a song that already exist in an album (note that 2 songs are identical if name, artist, and duration are the same).

delete an album that does not exist. delete song that does not exist.

Request list of albums/songs under a certain criterion (functionalities 4, 5, 6, and 7) and the number of albums/songs is zero.

 

Program Requirements

Your program should implement three classes, which store the following data:

ava — storing the following details about a song. o name — the name of the song.

artist — the person/s performing the song. o duration — the length of the song in seconds o genre — the genre can be only “rock”, “pop”, “hip-hop” or “bossa nova” java —stores up to 4 Songs at a time. o name — the name of the Album.

songl, song2, song3, song4 — Song objects o total Time — the total playing time of all songs stored o MAX TIME — a constant which stores the maximum playing time for the album, set to a value of 20 (minutes).

SongC011ection . java — stores all albums in the system.

albuml, album2, album3 — All current Album objects stored in the system.

All the data components of your classes need to be private (this means that you are applying the principles of

Additionally, your classes need to have methods that provide the functionality outlined in the problem description. The only class which should have a main method is SongC011ection. j ava, which should create an instance of the class SongCollection and call the run () method which will have code to provide the user with a menu to allow them to perform any of the tasks outlined in the problem description. The template for this is below. The class

SongCollection also will be the only one that will receive inputs and show outputs.

public class SongCoIIection private void run ( ) {

/ /This method should control the flow of the program

/ / and have all code for accessing the Albums

public static void main (String [ l args) (

SongCoIIection sg = new SongCoIIection ( ) ; sg.run() ;

Again, a reminder that your program will ONLY use the concepts we learned in weeks 1 to 6.

You can choose TIO or GUI, as seen in lectures. Marks will be awarded for: layout, both visual (variable names, indentation) and structural (scope of variables, use of methods); documentation (comments); and ability of the submission to perform as specified. A more detailed marking schema is available.

 

What to submit.

You should submit the Java program (Song. java, Album. Java, SongC011ection . j ava) via the “Assignment 1” link on Canvas. Do not include .class files in your submission. Add the name of the student(s) on the top of each Java file submitted. If you are completing the assignment in pairs, add both names in each Java file.

 

Disclaimer

The sample projects provided on our website are intended to be used as a guide and reference for educational purposes only. While we have made every effort to ensure that the projects are accurate and up-to-date, we do not guarantee their accuracy or completeness. The projects should be used at your own discretion, and we are not responsible for any loss or damage that may result from their use.
At Programming Homework Tutors, we are dedicated to helping students and educators achieve their goals by providing them with the resources they need to succeed. Our website offers a variety of tools and resources that can help you with the project mentioned above.
Whether you need help with research, project management, or technical support, our team of experts is here to assist you every step of the way. We offer online courses, tutorials, and community forums where you can connect with other learners and get the support you need to succeed.
If you’re looking to take your skills to the next level and make an impact in your field, we invite you to explore our website and see how we can help you achieve your goals.

No Comments

Post A Comment

This will close in 20 seconds