Back to all lessons

Lesson 4

Point class

Task 0 (1p)

Create two variables, which:

  • have different type
  • are numerical
  • will be initialized with values you want

Task 1 (2p)

Write a program, that classifies a given number to one or more ranges:

  • A=(-5,7)
  • B=[5,9)
  • C=[3,5)
  • D=(-∞,3)

Task 2 (1p)

Use bitwise operations to check, if a number is divisible by 4.

Task 3 (1p)

Can we (or we can't) assign double value to a char variable? Why? Write answer as human readable message in code via "println".