Skip to content

Instantly share code, notes, and snippets.

View sieleemmanuel's full-sized avatar
👨‍💻

Siele Emmanuel sieleemmanuel

👨‍💻
  • Kenya
  • 16:30 (UTC +03:00)
  • X @Sielekim
View GitHub Profile
class MainActivity : ComponentActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContent {
TogisoftTheme {
Surface(
modifier = Modifier.fillMaxSize()
)
{
val phoneNumber = rememberSaveable { mutableStateOf("") }
@sieleemmanuel
sieleemmanuel / Circle.kt
Last active October 31, 2022 11:48
Hng9 Stage-1-Task-Mobile
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"
}