Create an instance of a car and an instance of an airplane

Assignment Help Computer Engineering
Reference no: EM132216534

Write a VehicleDemo.java class that does the following:

1- Creates an instance of a Car and an instance of an Airplane class.

2- Assigns values to the name, max_speed and number_of_cylinders instance variables of the Car object and the name, max_speed and number_of_engines instance variables of the Airplane object.

3- Calls all the methods of the Car and Airplane objects that return the values of their instance variables and prints the results.

4- Calls the runningCost(5) of the Car and Airplane objects and prints the result.

5- Calls the maintenanceCost (30.0) of the Car and maintenanceCost (250.0) of the Airplane objects and prints the result.

6- Defines a reference variable of type Vehicle and assigns it to an instance of a Car class. Example: Vehicle v1 = new Car(...);

7- Prints v1. Notice whether the toString() method of the Vehicle class is called or the toString() method of the Car class. Explain why it has been the case.

In Object Oriented paradigm, what is this called? need coding in java for all the parts.

Reference no: EM132216534

Questions Cloud

Write your own version of the c string library function : Your function should have the same prototype as strncat except that it has a different name char* my_strncat(char *str1, char str2, int n).
Determine gibbs free energy of mixing assuming solution : Determine gibbs free energy of mixing assuming ideal solution and also determine the excess gibbs free energy for the feed/input to flash drum
Find the turn and the average of the elements in the array : Find the turn and the average of the elements in the array.Determine the smallest and largest element of the array.
Create a database to manage multiple hotels : Writing business rules to eventually create a database to manage multiple Hotels.
Create an instance of a car and an instance of an airplane : Assigns values to the name, max_speed and number_of_cylinders instance variables of the Car object and the name.
Compute the factorial of value placed in a1 of active sheet : Write a VBA sub procedure to compute the factorial of a value placed in A1 of active sheet and place in B1 of the active sheet.
Simulate the roll of a pair of six-sided dice : Write a VBA script that randomly simulates the roll of a pair of six-sided dice and writes the sum of the roll to column A of the worksheet.
State your understanding of the requirement for this project : You have had a chance to state your understanding of the requirements for this project, draft a preliminary design, and express it by means of UML diagrams.
Calculate the number of successful packet deliveries : What you cannot know beforehand is the time it takes to copy these packets. But users love to see a progress bar which estimates a duration left for copying.

Reviews

Write a Review

Computer Engineering Questions & Answers

  Mathematics in computing

Binary search tree, and postorder and preorder traversal Determine the shortest path in Graph

  Ict governance

ICT is defined as the term of Information and communication technologies, it is diverse set of technical tools and resources used by the government agencies to communicate and produce, circulate, store, and manage all information.

  Implementation of memory management

Assignment covers the following eight topics and explore the implementation of memory management, processes and threads.

  Realize business and organizational data storage

Realize business and organizational data storage and fast access times are much more important than they have ever been. Compare and contrast magnetic tapes, magnetic disks, optical discs

  What is the protocol overhead

What are the advantages of using a compiled language over an interpreted one? Under what circumstances would you select to use an interpreted language?

  Implementation of memory management

Paper describes about memory management. How memory is used in executing programs and its critical support for applications.

  Define open and closed loop control systems

Define open and closed loop cotrol systems.Explain difference between time varying and time invariant control system wth suitable example.

  Prepare a proposal to deploy windows server

Prepare a proposal to deploy Windows Server onto an existing network based on the provided scenario.

  Security policy document project

Analyze security requirements and develop a security policy

  Write a procedure that produces independent stack objects

Write a procedure (make-stack) that produces independent stack objects, using a message-passing style, e.g.

  Define a suitable functional unit

Define a suitable functional unit for a comparative study between two different types of paint.

  Calculate yield to maturity and bond prices

Calculate yield to maturity (YTM) and bond prices

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd