Question
PROGRAM IN JAVA, USING NETBEANS Programming Most of the credit for the programming part of this final will be given for making good use of
PROGRAM IN JAVA, USING NETBEANS
Programming
Most of the credit for the programming part of this final will be given for making good use of the programming ideas we've covered. A program that runs with nice output but does not make use of these ideas will get minimal credit.
Feel free to reuse code you have already written or example code that has been given, but be sure to remove portions unrelated to the current assignment, and to update variable names, method names, etc. Readability matters.
Use comments to clarify what your code is trying to do. If code does not work; partial credit will only be given if comments explain what it was trying to do.
Programming Assignment [80]
Read the assignment before you start. The order in which aspects are described does not necessarily indicate the order in which you should write the code. It is up to you to use the concepts we have covered to design the classes and methods that will go into your program; your grade will be based on how well you do this.
We will have an online store with media items, and customers that can buy, own, and use these items.
A media item has a name and a price. Users can "use" their media items; when basic media items are used, just print a message including the name, saying that it is in use.
There are three 3 types of media -- books, movies, and games. In addition to what all media has, books also have an author and number of pages, movies have a running time, and games have a version number. When a book is used, tell the user the book is being opened and how many pages, when a movie is used, tell the user the video is playing and how many minutes long it is, when a game is played, tell them the game is starting and tell the user the version. (You only need to display messages to say that these things are happening; youdo notneed to worry about any actual media.).
The store has a list of media items being sold and a list of customers.
Each customer has a name, a balance (how much money is in their account) and a list of the media they have bought (which starts off empty, but they should be able to buy at least 10).
When the program runs, we will need a store that has at least 15 different media items, including some of each type[relies on polymorphism]and also at least 5 customers. (Put a comment at the top of your main class with the customer names, so that I can test your program without having to search!)
A customer can log in by typing in their name, or quit the program. If they type in a wrong name, they're just back to the option to log in or quit.
A customer who is logged in can add money to their balance, browse the media they already own, shop for more, or log out.
When customers shop for new items, they are shown a list of all items in the store and can choose one from the list (probably by number). When they choose an item to buy, we need to check that they have enough money, and if so, add the chosen to their list and remove that much money from their balance.
When customers browse their own media, they are shown all the items they own, and can choose from the list an item to use.
Whenever one customer logs out, we should be back at letting a customer log in or quit the program. Within one run of the program, a customer should be able to log in, buy new media, log out, then log back in again later and see that media when they browse what they own, even if other customers have also logged in between.
[EC+10] In addition to logging in and quitting, add an option for a new customer to join. A new customer cannot have the same name as any existing customer. Once a new customer is added, they can log in and log out like any other customer.
PROGRAM IN JAVA, USING NETBEANS
Programming
Most of the credit for the programming part of this final will be given for making good use of the programming ideas we've covered. A program that runs with nice output but does not make use of these ideas will get minimal credit.
Feel free to reuse code you have already written or example code that has been given, but be sure to remove portions unrelated to the current assignment, and to update variable names, method names, etc. Readability matters.
Use comments to clarify what your code is trying to do. If code does not work; partial credit will only be given if comments explain what it was trying to do.
Programming Assignment [80]
Read the assignment before you start. The order in which aspects are described does not necessarily indicate the order in which you should write the code. It is up to you to use the concepts we have covered to design the classes and methods that will go into your program; your grade will be based on how well you do this.
We will have an online store with media items, and customers that can buy, own, and use these items.
A media item has a name and a price. Users can "use" their media items; when basic media items are used, just print a message including the name, saying that it is in use.
There are three 3 types of media -- books, movies, and games. In addition to what all media has, books also have an author and number of pages, movies have a running time, and games have a version number. When a book is used, tell the user the book is being opened and how many pages, when a movie is used, tell the user the video is playing and how many minutes long it is, when a game is played, tell them the game is starting and tell the user the version. (You only need to display messages to say that these things are happening; youdo notneed to worry about any actual media.).
The store has a list of media items being sold and a list of customers.
Each customer has a name, a balance (how much money is in their account) and a list of the media they have bought (which starts off empty, but they should be able to buy at least 10).
When the program runs, we will need a store that has at least 15 different media items, including some of each type[relies on polymorphism]and also at least 5 customers. (Put a comment at the top of your main class with the customer names, so that I can test your program without having to search!)
A customer can log in by typing in their name, or quit the program. If they type in a wrong name, they're just back to the option to log in or quit.
A customer who is logged in can add money to their balance, browse the media they already own, shop for more, or log out.
When customers shop for new items, they are shown a list of all items in the store and can choose one from the list (probably by number). When they choose an item to buy, we need to check that they have enough money, and if so, add the chosen to their list and remove that much money from their balance.
When customers browse their own media, they are shown all the items they own, and can choose from the list an item to use.
Whenever one customer logs out, we should be back at letting a customer log in or quit the program. Within one run of the program, a customer should be able to log in, buy new media, log out, then log back in again later and see that media when they browse what they own, even if other customers have also logged in between.
[EC+10] In addition to logging in and quitting, add an option for a new customer to join. A new customer cannot have the same name as any existing customer. Once a new customer is added, they can log in and log out like any other customer.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started