Question: Streaming tv procedurally In this assignment you will practice Java fundamentals by modeling some basic information about a streaming series (say, on Netflix, Hulu, etc).

Streaming tv procedurally In this assignment 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

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!