Posts

Showing posts from May, 2019

Create a class named Movie that can be used with your video rental business in java

Image
Create a class named Movie that can be used with your video rental business. The Movie class should have ID Number, and movie title with appropriate getter and setter methods. Also create an equal() method that overrides Object ’s equals() method, where two movies are equal if their ID number is identical. Next, create three additional classes named Action, Comedy, and Drama that are derived from Movie. Finally, create an overridden method named calcLateFees that takes as input the number of days a movie is late and returns the late fee for that movie. The default late fee is $2/day. Action movies have a late fee of $3/day, comedies are $2.50/day, and dramas are $2/day. Test your classes from a main method. Solution code: import java.sql.SQLOutput ; class Movie { int id ; String title ; public Movie ( int id , String title) { this . id = id ; this . title = title ; } public int getId () { return id ; } public void setId ( int...

A publishing company that markets both book and audio-cassette in java. (Solution)

Image
Q   Imagine a publishing company that markets both book and audio-cassette versions of its works. Create a class publication that stores the title and price of a publication. From this class derive two classes:  a. Book, which adds a page count  b. Tape, which adds a playing time in minutes. Each of these three classes should have set() and get() functions and a display() function to display its data. Write a main() program to test the book and tape class by creating instances of them, asking the user to fill in their data and then displaying the data with display(). Solution code class Publication{ int price ; String title ; public Publication ( int price , String title) { this . price = price ; this . title = title ; } public int getPrice () { return price ; } public void setPrice ( int price) { this . price = price ; } public String getTitle () { return title ; } p...

how to connect domain with hosted server using server name

Image
how to connect domain with hosted server using server name .This video is about how to connect domain with name server this is the easiest way to connect domain with hosting.we assume that you buy domain and hosting so logging to your both account and follow the step if you not understand than watch video again and again. 

iron throne voting