Download presentation
Presentation is loading. Please wait.
1
Welcome back! March 21, 2019
2
https://bit.ly/2SIWREN
Attendance
3
Elections Next Week! President: Must currently be a junior
Experience with programming (Java required, other languages recommended) Vice president: Must be at least a sophomore currently Secretary Well-organized, able to maintain good communication with rest of board and club Experience with programming recommended, not required Treasurer Willing to communicate with ASB and bookkeeper about finances/club dues
4
Refresher on last week 2D arrays specify an array with rows and columns This is how you initialize them: Same rules apply for 2D arrays as arrays: number of elements is fixed, can’t be changed
5
Next steps: ArrayLists
Arrays get pretty useless if you have a problem that requires more storage Since arrays can’t add storage as you go along, what do you do if this happens? There’s something called ArrayLists that are similar in structure to arrays but they can add more elements at the end The number of elements is NOT fixed How to initialize an ArrayList:
6
More info Benefits: Helpful if you need to manipulate arrays a lot
Can grow and shrink in size Cannot be used with primitive data types like int, char, etc. Supports methods like .add() In order to find the length of the Arraylist you would use .size() instead of .length like we did for arrays
7
Practice! Create a new array list, add some song names (string) and print out the collection Write a Java program to iterate through all elements in a array list (Your arraylist playlist) Write a Java program to search an element in a array list. (If or else) Dynamically find the number of elements in your arraylist Check if your arraylist contains a certain song Replace an element with another song
8
MORE PROBLEMS! (possibly harder) PROBLEM OF DIFFICULTY
Write a Java program to sort a given array list. Write a Java program to shuffle (your songs) elements in a array list (playlist). Write a Java program to join two array lists. PROBLEM OF DIFFICULTY Make a program that will randomly select one of your elements, and then print the lyrics of said song, or add a url for the song. (this will require you to add lyrics to all of them.)
9
Reminder for Elections
If you missed last meeting, or need a refresher; club elections are on March 28th. Applicants will need a speech If you would like to apply for any of the following roles, and need a refresher on the requirements come see us over at the desk. President Vice President Secretary Treasurer
10
Thank you guys! Our next meeting is on March 21st. Hope to see you guys there!
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.