r/learnjavascript • • 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

8 comments sorted by

5

u/Ekid113 Jun 01 '19

Keep searching and push through- the only way to learn is to do.

What is general assignment?

1

u/Errkal Jun 01 '19

How far have you got, what do you need to do, what is tripping you up?

-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

17

u/NemeanHunter Jun 01 '19

Not to be that guy, but u are asking Java Qs in Javascript sub..

7

u/Errkal Jun 01 '19

Turns out he really really doesn't know JavaScript :'D

0

u/[deleted] Jun 01 '19

[deleted]

-3

u/NovaPhoenix0208 Jun 01 '19

Copy that, cheers man

1

u/[deleted] Jun 01 '19

shit i'll do it, but I might be lying about knowing javascript too.

1

u/not-so-stupid-idiot Jun 01 '19

https://youtu.be/SHIT5VkNrCg

Go through his playlist. It won’t take long, it’s easy to follow, has exactly what you’re looking for. Everything you need should be within the first few videos.