Find Jobs
Hire Freelancers

Develop Java classes for each of the following objects

$20-25 USD

Completed
Posted about 22 years ago

$20-25 USD

Paid on delivery
Develop Java classes for each of the following objects: 1. A generic element class named elt; abstract class, no data members and no member functions. 2. A child class of the class elt named comp_elt; abstract class, no data members and 1 abstract member function named compare. The compare function is to be called as [login to view URL](y) where both x and y are instances of comp_elt; compare returns -1 if x < y; 0 if x = y; 1 if x > y. 3. A generic stack class named my_stack; concrete class, each instance has a data member which is an array of references to instances of class elt. Another data member named count is an int which keeps track of the number of active elt refs in the given instance of my_stack. Two more int data members named max and grow_by keep track of the current size of the array and the amount it should grow by if it fills up at the current size. member functions: default constructor sets max to 50 and grow_by to 0. a second constructor allows user to set both the initial size of the array and the grow_by amount as parameters. The first parameter sets the size to 50 and the second to 10. a member function named push takes an elt ref as its only parameter and inserts that elt ref into the stack as the Last-in member of the stack. a member function named pop removes the Last-in ref and returns that ref to the user. a member function size returns the number of active elt refs in the current stack. a member function empty returns true if the stack is empty, false otherwise. 4. A generic queue class named my_queue;concrete class, each instance has a data member which is an array of references to instances of class elt. Two more data members named front and back are ints and keep track of the indices of the front and back elt refs in the given instance of my_stack. Two more int data members named max and grow_by keep track of the current size of the array and the amount member functions: default constructor sets max to 50 and grow_by to 0. a second constructor allows user to set both the initial size of the array and the grow_by amount as parameters. insert: takes a single comp_elt ref and inserts that ret into the heap. remove: removes the root from the heap and returns the appropriate ref. size: returns number of active comp_elt refs in the heap. bubbleup(private): restores the power relationship in the heap during inseret. bubbledown(private): restores the power relationship in the heap during a remove. ## Deliverables Complete and fully-functional working program(s) in executable form as well as complete source code of all work done. Program must be fully comment. Complete copyrights to all work purchased. DUE March 19, 2002. 7:00PM Eastern Time. *** PLEASE SEE ATTACHMENT FILE FOR DETAIL OUTLINE! *** ## Platform Must be able to compile and execute on Java (JDK 1.1) DUE March 19, 2002. 7:00PM Eastern Time. *** PLEASE SEE ATTACHMENT FILE FOR DETAIL OUTLINE! *** ## Deadline information DUE March 19, 2002. 7:00PM Eastern Time. *** PLEASE SEE ATTACHMENT FILE FOR DETAIL OUTLINE! ***
Project ID: 2842088

About the project

23 proposals
Remote project
Active 22 yrs ago

Looking to make some money?

Benefits of bidding on Freelancer

Set your budget and timeframe
Get paid for your work
Outline your proposal
It's free to sign up and bid on jobs
Awarded to:
User Avatar
See private message.
$4 USD in 14 days
5.0 (3 reviews)
1.8
1.8
23 freelancers are bidding on average $14 USD for this job
User Avatar
See private message.
$15.30 USD in 14 days
5.0 (137 reviews)
7.0
7.0
User Avatar
See private message.
$21.25 USD in 14 days
5.0 (53 reviews)
5.4
5.4
User Avatar
See private message.
$21.25 USD in 14 days
5.0 (60 reviews)
5.0
5.0
User Avatar
See private message.
$17 USD in 14 days
5.0 (43 reviews)
4.8
4.8
User Avatar
See private message.
$8.50 USD in 14 days
4.2 (20 reviews)
4.7
4.7
User Avatar
See private message.
$11.90 USD in 14 days
5.0 (32 reviews)
4.2
4.2
User Avatar
See private message.
$15.30 USD in 14 days
4.9 (69 reviews)
4.2
4.2
User Avatar
See private message.
$17 USD in 14 days
5.0 (1 review)
3.9
3.9
User Avatar
See private message.
$15.30 USD in 14 days
5.0 (26 reviews)
3.7
3.7
User Avatar
See private message.
$17 USD in 14 days
4.8 (9 reviews)
3.3
3.3
User Avatar
See private message.
$20.40 USD in 14 days
5.0 (18 reviews)
2.9
2.9
User Avatar
See private message.
$3.40 USD in 14 days
5.0 (1 review)
2.0
2.0
User Avatar
See private message.
$17 USD in 14 days
5.0 (11 reviews)
1.7
1.7
User Avatar
See private message.
$8.50 USD in 14 days
5.0 (5 reviews)
1.3
1.3
User Avatar
See private message.
$21.25 USD in 14 days
5.0 (2 reviews)
1.2
1.2
User Avatar
See private message.
$10.20 USD in 14 days
5.0 (5 reviews)
1.1
1.1
User Avatar
See private message.
$17 USD in 14 days
5.0 (2 reviews)
0.6
0.6
User Avatar
See private message.
$12.75 USD in 14 days
4.3 (2 reviews)
0.8
0.8
User Avatar
See private message.
$17 USD in 14 days
4.0 (2 reviews)
0.5
0.5
User Avatar
See private message.
$4.25 USD in 14 days
0.0 (0 reviews)
0.0
0.0

About the client

Flag of UNITED STATES
United States
5.0
2
Member since Feb 23, 2002

Client Verification

Thanks! We’ve emailed you a link to claim your free credit.
Something went wrong while sending your email. Please try again.
Registered Users Total Jobs Posted
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Loading preview
Permission granted for Geolocation.
Your login session has expired and you have been logged out. Please log in again.