Closed

3 Classes - 1 driver 2 functional program

In this set of programs, you will write classes that work together.

The classes are: 1. Truck 2. Car 3. Orders

REQUIRES user input and printing to be done in the classes other than the “test (or main) class”. The reason of this is, the (nonmain) classes will “take care of themselves”. That means the classes have all the knowledge to prompt the user for their information, store and retrieve their information, along with the accessors and mutators to return this information to the main program as requests are made.

The Order class accepts from the user what kind of vehicle they want to purchase, a Car (C/c) or a Truck (T/t). From this simple choice, Order calls the default constructor for the class requested. The default constructor is to call a method(s), name the methods the same in both the Car or Truck class.

From this constructor, the Orders class creates and object of Truck and of Car, per user’s request. Each Truck and Car selected will ask the user for some basic information; these are Model, Color, and Cost.

In addition to these three basic pieces of information when a: • Truck order; you will use a menu system to ask the user if: • Is it a “half ton”, or “one ton” truck? • Engine size, choices could be. “Really big”, “Not so big” (Please choose other engine sizes than these.) • Car order; you will use a menu system to ask the user: • The type of car: sedan, coupe, or wagon? • Does it have a towing package 1=yes, 2=no?

These options are numbered, 1, 2, etc. See the output examples for how the selections of these are to work.

The Orders class uses the Truck and Car classes as needed. Creating a new object of the Truck or Car and adding the appropriate object to a Collection maintained by Orders.

Once the user says there are no more orders, have Orders iterate through Order’s Collection. In this loop determine if the object is a Truck or Car by using the “instanceof” operator. If it is a Car, then cast the object as Car and execute the toString() to have it return the formatted information about the car (see output). Similarly for if the object is of the Truck class.

Requirements: • Truck and Car classes have a default constructor that calls methods which request input to that class. • Classes must have Accessors and Mutators for all attributes, along with a toString(). • Must store the orders for Truck and Car in ONE common Collection. Inputs MUST be in order and data type as shown (or 15 points deduction). That is, menu’s must accept numeric entries for the menu choices. For example, you may set the Truck Engine Size to say any two size options you want, but they must be asked at the correct time and the number choices must be 1 and 2.

In similar methods of Truck and Car, give them the same name.

Do you want to order a Truck (T/t) or Car (C/c)? C

Entering Car order:

Model: Ford

Color: Green

Cost: 19875.95

What type of Car is this?

1. Sedan

2. Coupe

3. Wagon

Choice:

3 Does this car have a towing package?

1. Yes

2. No

Choice: 1

Do you want to order another vehicle? Y

Do you want to order a Truck (T/t) or Car (C/c)? T

Entering Truck order:

Model: Dodge Ram

Color: red

Cost: 25000.95

What size truck is this?

1. Half-ton

2. Full ton

Choice: 1

What is the engine size of the truck?

1. Really big

2. Not so big

Choice: 2

2. No Choice: 2

Do you want to order another vehicle? n

Car: Model: Ford Color: Green Cost: $19875.95 Type: Wagon Towing: included

Truck: Model: Dodge RamTruck Color: red Cost: $25000.95 Load: Half-ton Engine: Not so big

Thank you for using Your Name's Ordering System.

//end sample output

Skills: Java

See more: Upgrade oscommerce 2 3 1 to 2 3 4 Jobs, http://v.youku.com/v_show/id_XMTYyMzM1MzE5Ng==.html?from=y1.2-1-87.3.7-1.1-1-1-6-0, logo needed. i need 3 logos. 1 DESIGN FOR ALL 3. 1. cargo2lagos.com 2. cargo2ghana.com 3. cargo2senegambia.com, build php did_dest 84768&r1 1&r2 2&r3 3&r4 4&hour 0&repeat 3&gid 17&t 0&option 256did_dest, build php did_dest 84768&r1 1&r2 2&r3 3&r4 4&hour 0&repeat 3&gid 17&t 0&option 256, program functional specs sample, software functional specification sample, simple jsp chat program sample, sql moblie edition program sample, java program sample payroll, functional specification sample, visual basics inventory program sample, vbnet point sale program sample, room booking web based program sample vbnet, web site functional specification sample document

About the Employer:
( 0 reviews ) United States

Project ID: #15249515

28 freelancers are bidding on average $39 for this job

it2051229

Hi there, I went through the requirements regarding the details of the Car, Truck, and Order classes. I can do this project if given the opportunity. Let me know if you are interested. Thanks. Relevant Skills and Exp More

$30 USD in 1 day
(968 Reviews)
7.5
dobreiiita

Hello I am Java expert and interested in this project. I have reviewed the details and confident to handle the project perfectly. I will keep codes simple and well documented. Please communicate to discuss further. More

$50 USD in 1 day
(374 Reviews)
7.4
urmate

HI Contact me for an efficient, perfect, well documented development of your project according to 100% accuracy and requirements, with dedicated support. Thanks Farah Saif >>>>>>>>>>>>>>>>> Solution W More

$30 USD in 1 day
(206 Reviews)
6.3
yassine008

Hi there, how are you? I am a programmer with good skills. I'm expert java/software/web developer with more than 7 years experience in IT area working with cutting edge technologies. I've just read your proje More

$133 USD in 2 days
(28 Reviews)
5.6
dipakjadhav08

I have 8 years experience in java Relevant Skills and Experience java Proposed Milestones $35 USD - complete

$35 USD in 1 day
(68 Reviews)
5.1
SamindaPeramuna

Hi I could get this done within a couple of hours. If interested please let me know in the chat. Cheers, Saminda Relevant Skills and Experience C++, Java Proposed Milestones $20 USD - Default Milestone

$20 USD in 1 day
(37 Reviews)
5.2
mhortis

I am a senior Full-Stack Java developer and I have coped with several projects, small and more complex. I can deliver your project in a few hours. Relevant Skills and Experience I have a very strong academic backgroun More

$100 USD in 1 day
(8 Reviews)
4.9
achouriissam

Hello My name is Achouri Issam. I have over three years experience in Software Engineering and i have a good Knowledge with Java, JavaEE,Android,IOS, Spring, Spring MVC, EJB,Struts2, Hibernate, JSP, Servlet , JPA, JSF More

$16 USD in 2 days
(15 Reviews)
4.7
Shankarone

I can complete this project in 5 hours. Message me and I'll start working on it :) Relevant Skills and Experience . Proposed Milestones $25 USD - project milestone

$25 USD in 0 days
(16 Reviews)
4.3
mehfuza

Dear Client, I'm Computer Engineer and I have experience of programming in Java. I have coded many programs including data structure, algorithm and games. I have written similar programs recently and I understand your More

$20 USD in 1 day
(13 Reviews)
3.8
junaidlodhi6

i can make you this. it's no big deal. looking forward to hearing from you. thanks!!! Relevant Skills and Experience java Proposed Milestones $20 USD - classes java

$20 USD in 1 day
(8 Reviews)
3.2
YonTech

Hello Sir, We are Yontech softwares. We work in mobile applications , web applications , website development & design etc. We have expertise in working in Java , Android , PHP etc. We are looking forward to hearing More

$45 USD in 1 day
(6 Reviews)
3.6
progcgstar

I am a c++,c#, java, android, javascript, php expert. I'm experienced, skillful and enthusiastic enough finish ur project wonderfully. I'm always ready for u. Regards.

$50 USD in 1 day
(2 Reviews)
2.6
$20 USD in 1 day
(1 Review)
2.4
$25 USD in 1 day
(5 Reviews)
3.2
ZoranVu

I'll do this request quickly. Clean and understandable code. Relevant Skills and Experience Long and wide Java experience, OOP expert. Proposed Milestones $20 USD - Finish the program

$20 USD in 1 day
(1 Review)
2.0
rehotrics

It seems you want to implement OOPs concept. I will develop your as you mentioned above. I will even help you to understand flow assuming it your assignment. I will document if you want. Relevant Skills and Experien More

$20 USD in 1 day
(1 Review)
0.4
$25 USD in 1 day
(0 Reviews)
0.0
ITProGateway

Expert in .Net 1-4.6 c# , c++ , java Relevant Skills and Experience android studio , eclipse , netbeans Proposed Milestones $200 USD - 0

$200 USD in 3 days
(0 Reviews)
0.0
mariamirko

I have experience in developing Java projects and I'm looking forward to start working with you.

$11 USD in 3 days
(0 Reviews)
0.0