Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Java language in JGRASP only B01 - Netflix Queue You will write a program that queues all the episodes from all the seasons of some

Java language in JGRASP only

B01 - Netflix Queue

You will write a program that queues all the episodes from all the seasons of some TV shows so that users can binge watch and see them in order.

Your program will ask the user how many tv shows to add to the queue. For each TV show, your program will ask the user the title of the TV Show and print it. Then, it will ask the user for the number of seasons. For each season, your program will print "Season X", where X is the current number of the season. Then, your program will ask the user for the number of episodes in that season. For each episode, your program will print "Watching Episode Y", where Y is the current number of episodes.

For instance, the user enters 2 TV Shows:

For TV SHOW 1: Program asks user for the title, user enters "Arrested Development".

The program prints: "Arrested Development"

The program asks for the number of seasons, the user enters 2.

For season 1, the program prints "Season 1".

The program asks for the number of episodes, the user enters 3.

The program prints:

"Watching episode 1"

"Watching episode 2"

"Watching episode 3"

For season 2, the program prints "Season 2".

The program asks for the number of episodes, the user enters 2.

The program prints:

"Watching episode 1"

"Watching episode 2"

For TV SHOW 2, the same as for TV SHOW 1.

B02 - Bitcoin investment

You will write a program that emulates the stock market for some cryptocurrency. These currencies fluctuate a lot and go up and down quickly. You will write a program that asks the user for an amount in dollars to invest in this cryptocurrency. Then, the program will ask the user for the number of days to invest for.

Each day, your program will generate a random decimal number between -100 and +100 for odd-numbered days, and -50 and +50 for even-numbered days. That number represents the percentage your investment decreases or increases that day. That is, if you have +50.00, for instance, and that day your investment was worth $100.00, then at the end of that day your investment will be worth $150.00.

Every day, your program needs to print a message with the initial investment worth, the percentage increased/decreased and the final amount that day, with the following format:

Day 5. Initial investment worth: $100.00. +50.00%. Final investment worth: $150.00

B03 - Shopping Cart

You will write a program that will compute the total amount for a shopping cart, and print the final receipt.

Your program will start by asking the user for the number of items. For each item, your program will ask for the current item. The user will enter the name of the item ("banana", "apple", "milk" or "water"). The items supported, and their prices, are the following:

Banana: $1.00.

Apple: $1.25.

Milk: $1.50.

Water: $0.50.

Items are not grouped together. That is, if you have 2 bananas, for instance, assume that the user scans one banana, and then scans another banana, so they are two different items.

Fruit items have a discount of 10%. After your program has "scanned" all the items, it will compute the total. If the total is above $50.00, you will apply an additional discount of 25%. After applying, or not applying, the discount, you need to add a tax of 10%.

In the end, your program will print a receipt with the following information and format:

Total before tax: $

Tax: $

Discount applied:

Total after tax: $

B04 - Encryption system.

You will write an encryption system that will ask the user for a plain text message, it will perform some operations and modifications on it, and it will print the encrypted message.

You program will start by asking the user for the input plain text message. For each character in the message, your program will get its ASCII code number, it will square it, divide it by 3, take the square root and convert it back to an integer. If this number is lower than 33, then you will set it to 33. If this number is greater than 127, you will set it to 127.

Then, you will print the character whose ASCII code is that number.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Objects And Databases International Symposium Sophia Antipolis France June 13 2000 Revised Papers Lncs 1944

Authors: Klaus R. Dittrich ,Giovanna Guerrini ,Isabella Merlo ,Marta Oliva ,M. Elena Rodriguez

2001st Edition

3540416641, 978-3540416647

More Books

Students also viewed these Databases questions

Question

Find y'. y= |x + X (x) (x) X 1 02x+ 2x 1 O 2x + 1/3 Ex 2x +

Answered: 1 week ago

Question

18. If you have power, then people will dislike and fear you.

Answered: 1 week ago