Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

create a class Movie that reads in the name of a movie and its length in minutes, entered one line after the other at the

create a class Movie that reads in the name of a movie and its length in minutes, entered one line after the other at the console. The program must print the name of the film followed by runs for, then its length in hours and minutes. e.g. if the inputs are Finding Nemo and 104, then the program would output Finding Nemo runs for 1 hour and 44 minutes. If the movie is less than one hour, you should not print hours, if it is greater than one hour you should print hours instead of hour. Likewise for minutes; if there are no minutes, do not print them, if there is one, print minute, and if more than one, print minutes.

Thanks

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

The Database Experts Guide To SQL

Authors: Frank Lusardi

1st Edition

0070390029, 978-0070390027

More Books

Students also viewed these Databases questions