Hi,
Any idea how I can add a boolean method that will simply say whether a video is available or not. Such as, 'if' the video is available return true, 'else' return false.
I have to admit I'm pretty useless with boolean statements and would appreciate any advice.
The program is a simple Video store management program. My current code is as follows,
Also, do you think the above method for calculating TotalPrice will work in this class?Code:package videos; public class Video { private int days, referenceNumber; private static double dailyPrice; private double totalPrice; private Title videoTitle; public Video(int refNum, Title t, int d, double dp) { referenceNumber = refNum; videoTitle = t; days = d; dailyPrice = dp; } public Video(int title, String film, String lead1, String lead2, String dir){ videoTitle = new Title(title, film, lead1, lead2, dir); } public Title getTitle() { return videoTitle; } public int getReferenceNumber() { return referenceNumber; } public void setReferenceNumber(int refNum) { referenceNumber = refNum; } public int getDays() { return days; } public void setDays(int d) { days = d; } public double getDailyPrice() { return dailyPrice; } public void setDailyPrice(double dp) { dailyPrice = dp; } public double getTotalPrice() { return totalPrice; } public void ApplyTotalPrice() { totalPrice = days*dailyPrice; } public String toString() { return referenceNumber + "" + videoTitle + "" + totalPrice; } }
Any help appreciated!!![]()


Reply With Quote


Bookmarks