0
0
LLDsystem_design~10 mins

UML class diagrams basics in LLD - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to define a class with a name in UML notation.

LLD
class [1] {
}
Drag options to blanks, or click blank then click option'
APerson
Battribute
Cmethod
Dinterface
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'attribute' or 'method' as the class name.
2fill in blank
medium

Complete the code to add an attribute to a UML class with visibility.

LLD
class Person {
  [1] name: String
}
Drag options to blanks, or click blank then click option'
A-
B~
C#
D+
Attempts:
3 left
💡 Hint
Common Mistakes
Using '-' which means private, not public.
3fill in blank
hard

Fix the error in the UML method declaration by choosing the correct return type symbol.

LLD
class Person {
  + getAge() : [1]
}
Drag options to blanks, or click blank then click option'
Avoid
Bint
CString
Dboolean
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'void' which means no return value.
4fill in blank
hard

Fill both blanks to show correct UML notation for a private attribute and a public method.

LLD
class Car {
  [1] speed: int
  [2] accelerate()
}
Drag options to blanks, or click blank then click option'
A-
B+
C#
D~
Attempts:
3 left
💡 Hint
Common Mistakes
Using '+' for attributes which should be private.
5fill in blank
hard

Fill all three blanks to complete the UML class with an attribute, method, and return type.

LLD
class Book {
  [1] title: String
  [2] getTitle() : [3]
}
Drag options to blanks, or click blank then click option'
A+
CString
D-
Attempts:
3 left
💡 Hint
Common Mistakes
Making the attribute public or returning wrong type.