Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8484989
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T20:31:18+00:00 2026-06-10T20:31:18+00:00

I am kind of new to object oriented programming and I am learning the

  • 0

I am kind of new to object oriented programming and I am learning the concepts. Right now I only need help on just logically organizing the classes. The parts about the methods, attributes, and constructors I can figure out. I was assigned this following problem.

Holiday Travel Vehicles sells new recreational vehicles and travel
trailers. When new vehicles arrive at Holiday Travel Vehicles, a new
vehicle record is created. Included in the new vehicle record are a
vehicle serial number, name, model, year, manufacturer, and base cost.
When a customer arrives at Holiday Travel Vehicles, he or she works
with a salesperson to negotiate a vehicle purchase. When a purchase
has been agreed upon, a sales invoice is completed by the salesperson.
The invoice summarizes the purchase, including full customer
information, information on the trade-­‐in vehicle (if any), the
trade-­‐in allowance, and information on the purchased vehicle. If the
customer requests dealer-­‐installed options, they are listed on the
invoice as well. The invoice also summarizes the negotiated price,
plus any applicable taxes and license fees. The transaction concludes
with a customer signature on the sales invoice.

So far what I have thought of doing is making an invoice superclass with a customer and vehicle subclass since vehicle information and customer information is on the invoice. However since vehicles get records upon arrival to the dealership, I also thought about making vehicle it’s own class with the subclass travel trailer and RV since one involves an engine and one does not. However if I am doing vehicle records and vehicle information in an invoice I can’t make vehicle both it’s own class and a subclass of invoice.(If everything I am saying does not make sense, I am sorry I am just really confused.) So how should I arrange those classes? I am really lost.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T20:31:20+00:00Added an answer on June 10, 2026 at 8:31 pm

    Making vehicle and customer a sub-class of invoice doesn’t make a whole lot of sense. What I think you want is to make a vehicle class and a customer class, then within your invoice class you can hold an instance of the vehicle object and the customer object it dictates.

    public class Invoice {
        private Vehicle MyVehicle;
        private Customer MyCustomer;
        //...etc
    }
    
    public class Customer {
        private String FirstName;
        //...etc
    }
    
    public class Vehicle{
        private String Model;
        //...etc
    }
    

    For travel trailer and RV class it makes more sense to sub-class vehicle since they are in essence a vehicle so will share many common variables with vehicles. The question you need to ask yourself is whether something is something else (an RV is a vehicle), or it points to something (an invoice has a reference to a vehicle). I hope that is clear, it is definitely something I remember struggling with as I first learned it.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

So I'm kind of new to VB and am just playing around with a
In an object-oriented program: How much abstraction is too much? How much is just
Recently, while taking an introductory unit focused on Object Oriented programming, I was introduced
Right now I have a native function which sort of does this: Object o
Put another way, you create a new kind of object by making a package
One question that I have long asked myself is in object oriented programming,how should
In my developments I am slowly moving from an object-oriented approach to interface-based-programming approach.
Im kind of new in the whole papervision scene. For a school assignment I'm
I am kind of new to C# and Asp.Net, so this question might sound
I'm kind of new to algorithms and wanted to implement heap sort algorithm. The

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.