Monday

Midtvejsevaluering

  • Skriv 3 gode ting ved undervisning

  • Skriv 3 ting der bør forbedres

  • Sedler roterer tidtil man modtager sin egen igen

    • Der anføres en streg hvis man er enig med udsagnet

  • Sedlerne samles

Bagefter snakker vi om

  • Problem

  • Årsag

  • Konsekvens

  • Løsning

Preparation:

https://youtu.be/2_LRyf_FVVs

https://youtu.be/rh8BBS1_zkQ

Exercises

Exercise 1:

Create an Arraylist of Strings. Add 5 Strings to the Arraylist and print the Strings.

Exercise 2:

Print the Strings from the last index to the first (reverse order).

Exercise 3:

Write a method that takes parameters int n, int k & an Arraylist of Strings as parameters.

The method will only print the strings from index n to index k.

Exercise 4:

Write a method that prompt the user for a String. The user enters a String, the strings is added to an Arraylist & the user is prompted again.

If the user enters ”no strings attached” the program will terminate.

Exercise 5:

Write a method that takes parameters int n, int k & an Arraylist of Strings as parameter. The method will swap the elements of index n & index k.

Print the Arraylist before & after swapping. You can assume the arraylist is non-empty

Exercise 6:

Write a method that prompt the user for a String. The user enters a String and the method returns an ArrayList of the characters in the String.

Last updated

Was this helpful?