Project Overview
Part of the Fundamentals section of Coddy's Kotlin journey. Lesson 84 of 93.
Challenge
MediumIn this chapter, you'll build a Daily Expense Tracker with a menu-driven interface.
Print the menu for the expense tracker. The menu should display the following options, each on a new line:
--- Expense Tracker ---
1. Add Expense
2. View All Expenses
3. Total and Average
4. Clear All
5. Exit
Choose an option:Print this menu exactly as shown above, including the header with dashes and the prompt at the end.
Try it yourself
fun main() {
// TODO: Write your code below to print the expense tracker menu
}All lessons in Fundamentals
4Operators Part 1
Arithmetic OperatorsModulo OperatorAugmented AssignmentComparison OperatorsRecap - Simple Math7Basic IO
Println FunctionString TemplatesReadLine InputType ConversionRecap - Years Until RetirementRecap - True or False10Functions
Declare A FunctionParameters And ArgumentsReturn ValuesNamed ArgumentsDefault ValuesSingle Expression FunctionsRecap - Sigma FunctionRecap - Validation Function2Variables
Val vs VarType InferenceNumbersStringBooleanNaming ConventionsRecap - Initialize Variables5Operators Part 2
Logical Operators Part 1Logical Operators Part 2Logical Operators Part 3Ternary With If ExpressionRecap - Simple Logic8Bill Split Calculator
Welcome MessageGetting Input3Nullability
What Is Null SafetyNullable TypesSafe Call OperatorElvis OperatorFunction Challenge BasicsNot Null AssertionRecap - Safe Access6Decision Making
If StatementIf - ElseIf As An ExpressionWhen ExpressionWhen With RangesRecap - Simple Calculator9Loops
For LoopWhile LoopDo-While LoopBreakContinueRanges In LoopsNested LoopRecap - FactorialRecap - Dynamic Input12Lists Basics
List vs MutableListAccessing ElementsModifying ListsList MethodsPair And TripleRecap - Product ListRecap - Reversed List15Daily Expense Tracker
Project OverviewExit The ProgramPractice on your own: Kotlin playground