Answered step by step
Verified Expert Solution
Question
1 Approved Answer
I NEED JAVA CODE FOR NETBEANS. THANK YOU a. 1. Create a Transaction class with 3 fields: double price, integer unit and an integer count.
I NEED JAVA CODE FOR NETBEANS.
THANK YOU
a. 1. Create a Transaction class with 3 fields: double price, integer unit and an integer count. The class should have the following A constructor takes price and unit values as arguments b. A method returns the cost of a transaction (price multiply unit). A method returns the number of transaction objects every created (count). d. A toString method prints the price, unit and cost for a transaction An equals method compares two transaction's cost C. e. Write a main method in Transaction Demo class. Ask user to input numbers to create 2 transactions. Then print out the price, unit and costs of each of them. Then print the number of transactions, and check if the two transactions have the same costStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started