Computer Science

The course starts with teaching web design methods and their application. Students will be tasked with creating, building, and managing their individual personal and professional electronic portfolios in the shape of a website. It delves into fundamental concepts of object-oriented programming and methodologies. The students will cultivate computational thinking and problem-solving abilities through programming exercises, and gain proficiency in writing and evaluating software programs. Additionally, the course covers mobile application technologies. Students will utilize the software engineering lifecycle model to aid in the development of applications that serve the community.

Assignments

This code snippet is taken from an assignment in which we practiced the use of Java ArrayLists. It models a game of Bulgarian Solitaire, where a triangular number of cards are sorted into ascending piles. The game begins by starting with a total of N cards, which can be any type of cards, including unmarked index cards. These cards are then randomly divided into several piles of varying sizes. For instance, if there are 45 cards to start with, the initial piles might have sizes such as 20, 5, 1, 9, and 10. During each round of the game, one card is taken from each pile to form a new pile with these cards. Using the example starting configuration, the piles would be transformed into sizes of 19, 4, 8, 9, and 5 after the first round. The game continues until the piles have sizes of 1, 2, 3, 4, 5, 6, 7, 8, and 9, in any order. It is worth noting that this final configuration is always achieved when N represents a triangular number, meaning N equals the sum of the first k positive integers (1 + 2 + ... + k for some k).

This code snippet from an assignment implements the Sieve of Eratosthenes to find primes up to a number inputted by the user. The Sieve of Eratosthenes starts by creating a list of numbers from 2 to the specified limit. Then, it marks multiples of each prime number as composite. This process continues until all numbers are either marked as composite or identified as prime. The unmarked numbers that remain at the end of the process are the prime numbers up to the specified limit. This algorithm can be optimized to be very efficient for finding all prime numbers within a certain range and has been used for centuries due to its simplicity and effectiveness.