This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class MainActivity : ComponentActivity() { | |
override fun onCreate(savedInstanceState: Bundle?) { | |
super.onCreate(savedInstanceState) | |
setContent { | |
TogisoftTheme { | |
Surface( | |
modifier = Modifier.fillMaxSize() | |
) | |
{ | |
val phoneNumber = rememberSaveable { mutableStateOf("") } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
data class Circle(val radius:Double = 1.0, val color: String = "red"){ | |
private val PI = 3.14159265359 | |
fun getArea() = "Area: ${PI*radius*radius}" | |
fun getCircumference() = "Circumference: ${PI*radius*2}" | |
fun getDescription() = "Description: Radius: ${radius.toInt()} Color: $color " | |
fun getCircleColor() = "Color: $color" | |
} |