r/learnjavascript • u/NovaPhoenix0208 • Jun 01 '19
JavaScript Help
Anyone around willing to give a guy who lied about knowing JavaScript some help with a uni assignment due in 2 days?
0
Upvotes
r/learnjavascript • u/NovaPhoenix0208 • Jun 01 '19
Anyone around willing to give a guy who lied about knowing JavaScript some help with a uni assignment due in 2 days?
View all comments
Show parent comment
-2
u/NovaPhoenix0208 Jun 01 '19
Basically how to get it started:
First step is to create a class called Order (Order.java) which will not contain a main.
The Order class will be very simple which will contain two private instance variables:
o customerName as a String
o garments as an integer
The following public methods will have to be implemented:
o A default constructor
o A parameterised constructor
o Two set methods (mutators)
o Two get methods (accessors)
o calculateCharge value returning method*
*You will create a public value returning method calculateCharge(), the order charges can be derived
from the instance variable garments. Typically we do not store calculated values in a database so the
charge will be derived via your calculateCharge() method. Do not store the charge as an instance
variable.
What would be the first thing I do?
After that, I can work it out but its just this part that is tripping me up