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


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: functional programming tutorial, functional programming concepts, functional language example, functional programming definition, functional programming example, functional programming vs object oriented, functional programming javascript, functional programming languages, Upgrade oscommerce 2 3 1 to 2 3 4 Jobs,, logo needed. i need 3 logos. 1 DESIGN FOR ALL 3. 1. 2. 3., 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

About the Employer:
( 0 reviews ) United States

Project ID: #15249515

27 freelancers are bidding on average $33 for this job


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
(1029 Reviews)

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
(40 Reviews)

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
(376 Reviews)

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
(259 Reviews)

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
(25 Reviews)

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
(27 Reviews)

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
(46 Reviews)

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

$35 USD in 1 day
(79 Reviews)

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
(22 Reviews)

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
(16 Reviews)
$20 USD in 1 day
(8 Reviews)

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
(8 Reviews)

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
(16 Reviews)

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
(15 Reviews)

A proposal has not yet been provided

$30 USD in 1 day
(10 Reviews)
$25 USD in 1 day
(5 Reviews)

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)

Java OOp Relevant Skills and Experience Java OOP Proposed Milestones $55 USD - Classes of functional program

$55 USD in 2 days
(2 Reviews)

. Relevant Skills and Experience . Proposed Milestones $25 USD - . .

$25 USD in 1 day
(4 Reviews)

A proposal has not yet been provided

$30 USD in 3 days
(1 Review)