Fermé

Program using Inheritance

Code the class Publication with the two data members title (a String) and price (a double). Make the class an abstract class by declaring the abstract method display(), which should have a Graphics object as its first parameter. It should have two more parameters: one for the x-coordinate of where the display will take place, and one for the y-coordinate of where the display will take place. Declare and define a two-argument constructor that accepts two arguments - one to initialize the title and one to initialize the price. This class must be in its own file. Code the class Book, which extends Publication. Class Book has the added integer data member pageCount. Declare and define a three-argument constructor that accepts the title, price, and pageCount of the book. This constructor should call the constructor of its super class. The method display() should be defined in this class. The method should display on a Graphics object the title, price, and pageCount of the book, nicely formatted. This class must be in its own file. Code the class Tape, which extends Publication. Class Tape has the added integer data member playingTime. Declare and define a three-argument constructor that accepts the title, price, and playingTime of the tape. This constructor should call the constructor of its super class. The method display() should be defined in this class. The method should display on a Graphics object the title, price, and playingTime of the tape, nicely formatted. This class must be in its own file. Code an Applet class, Project5, in its own file, to do the following. (a) Declare an array inventory[] of three Publication references. (b) In init(), make the first reference of inventory[] refer to a Book object, created using new, for the title "C++ for Business Programming" with a price of 54.95, and a page count of 815. (Actually hard-code the book data.)

## Deliverables

1) Complete and fully-functional working program(s) in executable form as well as complete source code of all work done. 2) Installation package that will install the software (in ready-to-run condition) on the platform(s) specified in this bid request. 3) Complete ownership and distribution copyrights to all work purchased. (c) In init(), make the second reference of inventory[] refer to a Book object, created using new, for the title "The Killer Angles" with a price of 5.99, and a page count of 355. (Actually hard-code the book data.) (d) In init(), make the third reference of inventory[] refer to a Tape object, created using new, for the title "The Beatles Anthology II", with a price of 34.95, and a playing time of 137. (Actually hard-code the tape data.) (e) In paint(), code a for loop to display the data for the three objects referred to by the references of inventory[] by executing the display() method for the targets of the references. (Make sure that in the loop you vary the y-coordinate of where the displays take place so that the three displays do not overlap. If they overlap, you will see only the last one, not the first two.) NOTE: The applet does not have to handle events.

## Platform

Any windows. Using jcreator as the text editor.

Compétences : Ingénierie, Java, MySQL, PHP, Architecture Logicielle, Tests de Logiciels

en voir plus : string source code java, program to make a text editor php, programming text editor php, programming text editor, programming inheritance, program for java programming, java programming price, java programming editor, java programming business, java programming book, java 1.5 for loop, inheritance programming, for loop in c programming, for loop c programming, first class objects in java, editor applet, e book software for windows, define functional programming, c programming for loop, c++ for business programming

Concernant l'employeur :
( 1 commentaire ) United States

Nº du projet : #2922737

17 freelance font une offre moyenne de $22 pour ce travail

hernest

See private message.

%bids___i_sum_sub_35% %project_currencyDetails_sign_sub_36% USD en 14 jours
(122 Commentaires)
6.8
DanD

See private message.

%bids___i_sum_sub_35% %project_currencyDetails_sign_sub_36% USD en 14 jours
(212 Commentaires)
5.8
ziksainc

See private message.

%bids___i_sum_sub_35% %project_currencyDetails_sign_sub_36% USD en 14 jours
(62 Commentaires)
5.2
srazakvw

See private message.

%bids___i_sum_sub_35% %project_currencyDetails_sign_sub_36% USD en 14 jours
(35 Commentaires)
5.0
herculesevw

See private message.

%bids___i_sum_sub_35% %project_currencyDetails_sign_sub_36% USD en 14 jours
(79 Commentaires)
4.7
cossimin

See private message.

%bids___i_sum_sub_35% %project_currencyDetails_sign_sub_36% USD en 14 jours
(18 Commentaires)
3.5
folkforms

See private message.

%bids___i_sum_sub_35% %project_currencyDetails_sign_sub_36% USD en 14 jours
(19 Commentaires)
3.5
salajanvw

See private message.

%bids___i_sum_sub_35% %project_currencyDetails_sign_sub_36% USD en 14 jours
(14 Commentaires)
3.4
mihaidanila

See private message.

%bids___i_sum_sub_35% %project_currencyDetails_sign_sub_36% USD en 14 jours
(12 Commentaires)
3.3
xponentiald

See private message.

%bids___i_sum_sub_35% %project_currencyDetails_sign_sub_36% USD en 14 jours
(18 Commentaires)
3.3
fabianjones

See private message.

%bids___i_sum_sub_35% %project_currencyDetails_sign_sub_36% USD en 14 jours
(20 Commentaires)
3.3
nickyro

See private message.

%bids___i_sum_sub_35% %project_currencyDetails_sign_sub_36% USD en 14 jours
(8 Commentaires)
2.3
vthacker

See private message.

%bids___i_sum_sub_35% %project_currencyDetails_sign_sub_36% USD en 14 jours
(3 Commentaires)
1.5
geoupb

See private message.

%bids___i_sum_sub_35% %project_currencyDetails_sign_sub_36% USD en 14 jours
(0 Commentaires)
0.0
irfanzafar24

See private message.

%bids___i_sum_sub_35% %project_currencyDetails_sign_sub_36% USD en 14 jours
(1 Évaluation)
0.0
maxteamvw

See private message.

%bids___i_sum_sub_35% %project_currencyDetails_sign_sub_36% USD en 14 jours
(1 Évaluation)
0.0
taklee

See private message.

%bids___i_sum_sub_35% %project_currencyDetails_sign_sub_36% USD en 14 jours
(0 Commentaires)
0.0