Saturday, December 1, 2018

Week 11 29/11/2018

Hey, today is week 11 !
We continued to do our lab 8.

The second question is asked us to write a program that has the following methods to:
a. count the number of letters in a string using the following header:

 public static int countLetters(String s) 

b. find the number of occurences of a specified character in a string using the following header: 

public static int countCharacter(String str, char a)

The answers are as following :
(a) The user is prompt to enter a string, then the string is counted using for while loops. After int i is greater than length of string, the  number of letters will be returned to  countLetter(string).



(b) a is declared as a variable for specific character and it is counted using loops. For example, the number of occurences of a the specific character 't' in "Kitty" is 2.


 That's all for today's lab. The following question I will investigate in home and post it soon.
Thank you very muchhh!^^

LIM XUE TING
183615
SSK3100 (Group15)
Next blog: hennyabigail.blogspot.com (Henny Abigailwillyen Sinjus)

Lab 10 (Week 13 13/12/2018)

Heyyy, we had lab 10 which is our last lab. It is about two dimensional array. What is two dimensional array?? Let me explain it ! The e...