76 361
Assignments Done
Successfully Done
In May 2019

Answer to Question #14370 in Java | JSP | JSF for asd

Question #14370
Write a Java class DVD to satisfy the following user requirements.
The main method should ask the user (with a Pop up box) to input the
Title of a Film DVD and the cost of rental for one week.
If the user inputs ( Men in Black 3, 3.99), the programme should print
out a message as follows:
The cost of the DVD Men in Black 3 for one week is : � 3.99
Expert's answer
public class DVD {

* @param args
public static void
main(String[] args) {

String DVD=JOptionPane.showInputDialog("Input the
title of a Film DVD and the cost of rental for one week");

name=DVD.substring(0, DVD.indexOf(","));

System.out.println("The cost of
the DVD "+name+" for one week is:"+rental);


Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!


No comments. Be first!

Leave a comment

Ask Your question

Privacy policy Terms and Conditions