- Demonstrates declaring and displaying variables of various data types:
- Integer, Double, Float, Long, Short, Byte, Char, Boolean, and String.
- Converts values between different data types:
- Integer → Double
- String → Integer
- String → Double
- Accepts user input for student details such as name, enrolment no, branch, etc.
- Displays the entered details neatly formatted.
- Reads a number and determines whether it is odd or even.
- Uses control flow directly inside
println().
- Takes an integer (1–12) as input.
- Uses a when expression to display the corresponding month name.
- Implements a function to perform:
- Addition, Subtraction, Multiplication, Division
- Accepts two numbers as input and displays results.
- Demonstrates recursion by calculating factorial of a number.
- Explores Kotlin array functions:
Arrays.deepToString()contentDeepToString()IntArray.joinToString()
- Demonstrates loop operations (
for,range,downTo,until) - Implements sorting:
- Without built-in functions (manual sorting)
- With built-in functions (
sortedArray())
- Creates an
ArrayList<Int>and finds the maximum value using iteration and built-in functions.
- Defines a Car class with properties:
type,model,price,owner,milesDriven
- Implements functions:
- Get car information
- Calculate original price and current price
- Display formatted details
- Explains operator overloading in Kotlin.
- Implements a
Matrixclass with overloaded operators for:- Addition (
+) - Subtraction (
-) - Multiplication (
*)
- Addition (
- Overrides
toString()for customized output formatting.
1-2 Create two class named as Product and Laptop. Inherit with this information: Product class should be parent and child class should be Laptop class.
Add Product Name, Quantity, Amount per Quantity in Product class. In Laptop class add CPU name, RAM size, HDD Size, etc. of Laptop configuration.
Create primary and secondary Constructor of both class.
If Primary constructor is there then can we create secondary constructor in inheritance?
If we can create secondary and primary constructor both in child class then what is restriction if parent have more than two different secondary constructor?
Create List of 5 laptops in ArrayList and display all objects information.

**1-3 Create two class named as Person and Student. Inherit with this information: Person class should be parent and child class should be Student class. **
Add first name, last name, age in Person class. In Laptop class add enrollment no, branch, class, lab batch, etc. Create primary and secondary Constructor of both class. Create List of 5 students in ArrayList and display all objects information.