Question: Exercise 1 [ 4 0 Marks ] Write a class called Seller that may be used to model shops with the following attributes: table

Exercise 1[40 Marks]
Write a class called "Seller" that may be used to model shops with the following attributes:
\table[[Attribute name,Stored value,Description],[ID,PNP01,A unique key of the seller],[Name,Pic n pay,Name of the seller],[Location,Rondebosch,Location of the seller],[Product,Meet,The product to sell],[unit_price,R49.99,Price per unit],[number_of_units,1000,Number of available units]]
The class will only contain instance variables (we'll move on to constructors and methods in later assignments), one per attribute. Each variable should bear exactly the same name as the attribute it models. You must choose a suitable type for each variable based on the sample values. Hint: Money and Currency from assignment 1?
Page 1 of 6
Version 2024/07/2910:13:19
Based on the following sample I/O, write a simple program called "TestSeller.java" that asks the user to input seller details (as specified in the table), creates a Seller object and inserts the details in the appropriate fields, then retrieves and prints out those details.
Sample IO (The input from the user is shown in bold font - do not program this):
note that the price has to be an instance of the Money class and not a double.
Exercise 1 [ 4 0 Marks ] Write a class called

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!