I've started software engineering as a side course but that's what I really wanted to do. I'm familiar with C and Java Programming languages. I'm still working on the others currently on C++.

I needed help with a programming question.
Create a C++ program that displays the result of a sales transaction. The calculation requires three numbers. The first number represents the product price. The second number is the salesperson commission. These two numbers should be added together. The third value represents a customer discount; subtract this third from the result of the addition. Create two classes, The first class,
the transaction contains the method to do the calculation. The three numbers are passed to this method by a statement in the other class. The display is in the class that calls the calculation method. How do I go about this? It's kinda urgent if anyone could respond to it I'd appreciate.

Hi and welcome to DaniWeb! We can definitely help you with your homework. Can you please just show us the code you have so far and specifically where you’re stuck? Are you getting any compiler errors?

To get started, create a class for the transaction, and another for display. In the transaction class, define a function that takes in the three numbers and computes the result. In the display class, call the transaction function and output the result.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.