Kotlin Programming Fundamentals - Assessment

Overview

Kotlin Programming Fundamentals - Assessment


É hora de vermos o quanto você aprendeu sobre Kotlin e Programação Orientada a Objetos

Parte 1: Entendendo o projeto Estudante

  1. Baixe o código fonte deste projeto e importe para dentro do IntelliJ
  2. Entenda a estrutura do projeto:
  • Pacotes
  • Classes
  • Funcionalidades
  1. Execute o projeto e o teste para um entendimento maior de como o projeto funciona (lembre da Mentalidade de Persistência)

Parte 2: implementando o que falta na classe Student e StudentService

  1. Abra a classe Student (src/com/generation/model/Student.kt) e implemente os seguintes métodos:
fun enrollToCourse(course: Course?) {
    //TODO implement this method
}

fun isCourseApproved(courseCode: String?): Boolean {
    //TODO implement this method
    return false
}

fun isAttendingCourse(courseCode: String?): Boolean {
    //TODO implement this method
    return false
}

fun getApprovedCourses(): List<Course?>? {
    //TODO implement this method
    return null
}

  1. Abra a classe StudentService (src/com/generation/service/StudentService.kt) e implemente os seguintes métodos:
fun isSubscribed(studentId: String?): Boolean {
    //TODO implement this method
    return false
}

fun showSummary() {
    //TODO implement
}

Dica: Para exibir o sumário (que nesse caso, serão os estudantes que já foram inscritos), use o println()

Parte 3: Implementando os métodos que faltam no Main

  1. Teste o programa e verifica se funciona como o esperado:
  • Crie um novo estudante
  • Cadastra o estudante em alguns cursos.
  • Use a opção de Show Student Summary e Show Course Summary para verificar se está tudo ok

Parte 4: Lidando com Exceções

  1. Registre um novo usuário, passando uma data incorreta.
  2. Verifique o erro que acontece após rodar o programa
  3. Acesse a classe PinterHelper e modifique o método createStudentMenu, para lidar com a exceção que ocorre quando o usuário insere uma data incorreta.
  4. Mostre uma mensagem de erro para o usuário após conseguir lidar com a Exceção, além de atribuir uma data padrão para a variável birthDate, para não quebrar o programa.

Parte 5: Escrevendo Testes Unitários

  1. Escreva ao menos 1 teste unitário para a classe StudentService
  2. Escreva ao menos 1 teste unitário para a classe CourseService
You might also like...
Showcase project of Functional Reactive Programming on Android, using RxJava.

FunctionalAndroidReference FunctionalAndroidReference is a showcase project of Functional Reactive Programming on Android, using RxJava. It's a compan

Life is too short for Bash programming
Life is too short for Bash programming

A starter project to build command-line tools in Kotlin Multiplatform Contains a re-implementation of a real world CLI tool: git-standup Installation

Kotrlin Programming Language Cross-Platform Development which includes Android, iOS and Backend. Pretty much everwhere.
Kotrlin Programming Language Cross-Platform Development which includes Android, iOS and Backend. Pretty much everwhere.

Kotlin-Everywhere: Kotlin Programming Language Cross-Platform Development This is still a WIP but the idea is to create a tiny KOTLIN project that cou

An Interpreter/Transpiler for the Folders esoteric programming language, a language with no code and just folders
An Interpreter/Transpiler for the Folders esoteric programming language, a language with no code and just folders

Folders2kt 📁 An Interpreter/Transpiler of the Folders esoteric programming language, a language with no code and just folders, written in Kotlin Show

A functional, fractional-byte programming language

Fig A functional, fractional-byte programming language. Tired of annoying Unicode codepages in your favorite golfing languages? Fig uses pure, printab

Mocking for Kotlin/Native and Kotlin Multiplatform using the Kotlin Symbol Processing API (KSP)

Mockative Mocking for Kotlin/Native and Kotlin Multiplatform using the Kotlin Symbol Processing API (KSP). Installation Mockative uses KSP to generate

Kotlin-oop - Repositório criado para ser utilizado pelo projeto de Kotlin OOP desenvolvido em Kotlin nas aulas feitas através da plataforma Alura.

Projeto React OOP Repositório criado para ser utilizado pelo projeto de Kotlin OOP desenvolvido em Kotlin nas aulas feitas através da plataforma Alura

Kotlin-koans - Kotlin Koans are a series of exercises to get you familiar with the Kotlin Syntax

kotlin-koans-edu Kotlin Koans are a series of exercises to get you familiar with

Kotlin TodoMVC – full-stack Kotlin application demo

Kotlin full stack TodoMVC This project is an example implementation of the TodoMVC app written in Kotlin. More specifically, it's the Kotlin port of t

Owner
Roberta Assunção
Roberta Assunção
Edorva-assessment - A simple drawing app for Edorva's Assessment

Edorva Assessment app A simple drawing app for Edorva's Assessment Note: The app

Kahan D. Bhalani 0 Feb 12, 2022
Repo: Programming problems with solutions in Kotlin to help avid Kotlin learners to get a strong hold on Kotlin programming.

Kotlin_practice_problems Repo: Programming problems with solutions in Kotlin to help avid Kotlin learners to get a strong hold on Kotlin programming.

Aman 0 Oct 14, 2021
Android Kotlin Fundamentals 01.2: Anatomy of Basic Android Project

Welcome to Android Kotlin Fundamentals 01.2: Anatomy of Basic Android Project ?? Codelab de android para practicar apps Android con Kotlin ?? Homepage

null 0 Oct 23, 2021
Android Kotlin Fundamentals codelab(Lesson 2: Layouts(Constraints Layout))

ColorsMyView Finished code for Android Kotlin Fundamentals codelab(Lesson 2: Layouts(Constraints Layout)) Introduction The ColorMyViews app is inspire

Animesh Roy 0 Nov 26, 2021
Solution code for Android Kotlin Fundamentals Codelab 8.1 Getting data from the internet

MarsRealEstateNetwork - Solution Code Solution code for Android Kotlin Fundamentals Codelab 8.1 Getting data from the internet Introduction MarsRealEs

DavidHieselmayr 1 Apr 7, 2022
Collection of code samples for learning Android Fundamentals.

Android Tutorials Collection of code samples for learning Android Fundamentals and lessons in KOTLIN from YOUTUBE. The layout of Android Applications

Mustajab Ikram 2 Oct 11, 2022
It is a project that contains lessons and examples about Kotlin programming language. 🇰

Kotlin Tutorials What is Kotlin? I added the platforms it supports and great resources. You can access the article from the link below: https://medium

Halil Özel 94 Dec 22, 2022
101 examples for Kotlin Programming language.

This is a collection of runnable console applications that highlights the features of Kotlin programming language. The use of console application enab

Dody Gunawinata 192 Dec 1, 2022
Kotlin Programming Tutorial for Beginners

Kotlin Programming Tutorial for Beginners Learn Kotlin from scratch Topics to be

Prasoon 1 May 22, 2022
A coding examples project about Kotlin Programming language. 🇰

Kotlin Tutorial ????‍?? What is Kotlin ❓ Kotlin is a new programming language, developed by JetBrains. Jetbrains is a popular software development com

Mustajab Ikram 4 Oct 11, 2022