Object Oriented Programming

posted by .

Write an application class that generates 6 objects randomly from either a Car, or a Truck, or a Bicycle class. Your generated objects will be stored in a RentedVehicle array.
Write a static method in your test class that takes an array of RentedVehicles and prints the following for each element of the array:
• if the object is a car print its name and the number of seats and cost.
• if it is a Truck, print its name and capacity and cost.
• if it is a Bicycle, print its name and how many days it is rented and cost.

  • Object Oriented Programming -

    What is the question?

    You probably know that we do not write the program for you. We will be glad to give you hints, and help you debug if you run into problems.

    If you show us some of your work, we can get started from there.

Respond to this Question

First Name
School Subject
Your Answer

Similar Questions

  1. Computers(Java Programming)

    Service Class: Lottery Write a Lottery class that simulates a lottery. The class should define an array of five integers named lotteryNumbers. The constructor should use the Random class (see the Java API) to generate a random number …
  2. computer

    Object-Oriented Data and Processes • Identify a task you perform regularly, such as cooking, mowing the lawn, or driving a car. • Write a short, structured design (pseudocode only) that accomplishes this task. • Think about this …
  3. it 210 computer programming

    I need to generate an object oriented design for a system that keeps track of a DVD and CD collection. Identify each of the classes, associated data, and operations of the classes. Create the pseudo code for each of the classes and …
  4. computer science

    I need to see if someone can help me with a c# programming problem Create a class called employees that includes three pieces of information as either instance variables or automatic properties - a first name(type string), a last name …
  5. Programming

    I suppose to write a program that calculates the average of up to 50 numbers input by the user and stored in an array. The program should use a class name Statistics and have an AddNumber method that stores numbers into an arrey one …
  6. Programming

    I need your help to write a program using visual basic 2010 for the following:- write a program that calculates the average of up to 50 numbers input by the user and stored in an arrey. The program should use a class named Statistics …
  7. Programming

    Here is the question that I need help to write the code for the following program in Visual Basic 2010. I am trying to write the code but it has a run time error. If your could helps me to write the code it would be greatly appreciated. …
  8. C#

    Write a two class application that has a one-dimensional array as a data member. The array stores temperatures for any given week. Provide constructors for instantiating the class and methods to return the highest temperature, lowest …
  9. programming c#

    how do I Write a two class application that has a one-dimensional array as a data member. The array stores temperatures for any given week. Provide constructors for instantiating the class and methods to return the highest temperature, …
  10. programming

    – Define a structure called Object which includes three doubles specifying the object’s mass, volume and density. – Create an array of 10 Objects. – Define the function void scanobjectsdata(struct Object objects[], int size) …

More Similar Questions