Question
THIS IS MY LAST QUESTION SO PLEASE DO NOT ANSWER THE QUESTION IF YOU ARE PLANNING TO WRITE A CODE THAT DOES NOT ANSWER THE
THIS IS MY LAST QUESTION SO PLEASE DO NOT ANSWER THE QUESTION IF YOU ARE PLANNING TO WRITE A CODE THAT DOES NOT ANSWER THE QUESTION BELOW. THIS IS MY LAST QUESTION
i posted the same question and someone answered it but did not answer the question and wrote a code for staying at a hotel. SO PLEASE WHEN YOU ANSWER THIS LET IT BE AN ANSWER FOR WHAT THE QUESTION ASK BELOW
Streaming tv procedurally you will practice Java fundamentals by modeling some basic information about a streaming series (say, on Netflix, Hulu, etc). The assignment covers most of what was discussed in ist140 including loops, conditionals, methods, and input/output.
Getting Started: Create a new project in IntelliJ and call it asg1 (to stay organized, I recommend storing the projects folder within your assignments folder for the course).
With the project open in the IDE, create a new Java file named StreamingSeries.
Part 1: Getting Started with the series title Whichever series you choose to model, certain information about it will need to be input such as: the title of the series, genre, etc.
Think carefully about appropriate datatypes for the information listed, then start by adding a static method to:
prompt series title and return what was entered by the user; youll need to use the Scanner class to read in the title.
Part 2: Streaming series data collection methods Now add a main that calls this method and run it to ensure everything works so far. Now add the following static methods.
Prompt for the series runtime in minutes and validate that the amount entered is ok (i.e.: non-negative). If the amount entered is invalid, keep prompting until the user enters a valid runtime then return it.
Prompt for season-num episode names. An episode title consists of an integer season num- ber followed by the title of the episode. Heres an example run of this method (the parts that begin with > denote something a user typed):
Enter episode list; enter the season-num first and then the title. Enter -1 for a season-num to stop > 1 pilot episode > 2 another episode title > 2 title > 3 another title > -1 1
Season numbers should be added sequentially. Note: if it makes this easier, consider reading in the season-num first then the episode title and go from there. For example, typing the following should produce an error (and keep the prompt-loop going): > 1 pilot episode > 2 suspenseful season 2 opener > 3 yet another suspenseful season opener > 2 uh oh > Err: season numbers cant decrease > -1
The above input will look different if you choose to read the season num, first and episode title second. The method should return a datatype suitable for storing multiples strings.
For the run shown immediately above, this collection would contain the following strings:
S1 pilot episode S2 suspenseful season 2 opener S3 yet another suspenseful season opener
Prompt for the genre for the series. Acceptable inputs for the rating include: HORROR, SCI-FI, ROMANCE, TRUE-CRIME. If the user doesnt input one of these, keep prompting them until they enter one of the ratings listed. Return the validated genre.
Tackle the above methods one at a time. Heres pseudocode for what your main method should look like (adjust the (pseudo)code below to your ultimate choices for datatypes):
main: title = call the prompt series title method airtime = call the prompt series airtime method eps = call the prompt season -num episode names method genre = call the prompt genre method writeSeasonsData("season -data.txt", title , genre , airtime , eps)
readSeasonsData("season -data.txt") // prints each line of file Youll need to add the writeSeasonsData and readSeasonsData methods. Derive the method declarations needed based on the pseudocode above. One or more pieces of info should be written on a separate line. The read and write methods should handle any exceptions via try-catch.
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