Question
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
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