請問JAVA高手
請問像這樣的一個題目該如何寫呢...謝謝了
因為剛再學...覺得直接看寫好的程式和執行結果會比較容易了解
As part of the software for managing a small video club, we need to store information about the videos
that are available for borrowing and information about the members who are allowed to borrow the
videos.
For a video, we need to store the code number (an int), the film title (a String), the name of the
director (a String) and the daily hire charge (a double).
For a member of the club, we need to store the membership number (an int), the surname (a String),
the initials (a String), the phone number (a String) and the email address (a String).
Write a Java class Video that can be used to create Video objects for storing information about videos.
Your class should have an appropriate constructor and get and set methods. Your class should include a
static variable that keeps a count of how many Video objects have been constructed during a run of
the program. Your class should also include a toString method so that the data stored in a Video
object can be easily displayed. For example, the following code:
Video tiger = new Video(345672, "Crouching Tiger, Hidden Dragon",
"Ang Lee", 2.50);
System.out.println(tiger);
should result in output such as:
345672: Crouching Tiger, Hidden Dragon directed by Ang Lee, £2.50
Finally, your Video class should include a loanCost method that takes the number of days for a loan
(an int) as a parameter and returns the total cost of the loan.
Write a class Member that can be used to create Member objects for storing information about club
members Your Member class should also have a static variable to count the number of Member
objects and a toString method
Provide a main method that thoroughly tests your two classe