Sweety coding

Report a typo

Create a class called SweetBox. It must have two fields: sweet of "some type" (for example, Chocolate or Marmalade) and numOfSweets, which is Int. Also, the class should have a primary constructor, which initializes sweet and numOfSweets.

Write a program in Kotlin
// define the class
class SweetBox {

}

// don't change classes below
class Chocolate

class Marmelade
___

Create a free account to access the full topic