Question: Write a method computeStats() that takes one parameter: courseList, an array of strings, where each string represents a course eg. CS123. Each course has the

Write a method computeStats() that takes one parameter:

courseList, an array of strings, where each string represents a course eg. CS123. Each course has the format XXYYY, where XX represents the major (eg. CS, IS) and YYY the course number eg. 327.

The method returns the number of first year CS courses in the array. A first year CS course is any course in the format CS1YY, eg. CS142, CS100, CS147, etc.

Assume every major contains capital letters.

For example, if the data bellow shows the courses in the array:

CS183, CS133, IT194, CS124, CS274, IT193, IT273, CS383

the method will return 3

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!