My Works

Welcome to the Slot Machine!

As you try to obtain three in a row, your returns from the bets will be determined by the symbols and their multiplier value

A: x5 B: x4 C: x3 D: x2

How much would you like to deposit? $1000

Current Balance is $1000

Press enter to play (q to quit)

There are three lines that you can bet on

Enter the number of lines to bet on (1-3)? 3

What would you like to bet on each line? $100

You are betting $100 on 3 lines, so the total bet is equal to: $300

C | D | B

D | D | D

B | C | A

You won $200.

You won on lines: 2

Currrent Balance is $900

Press enter to play (q to quit)

Welcome to my own quiz!

I'm going to ask four questions that are associated with the information from the website.

Let's Play.

What's my major? ------

Correct!

what university am I attending? ------

Correct!

What do I like to eat in Little Italy, NYC? -----

Correct!

What's my ethnicity? ------

Correct!

You got: 4 Questions correct!

That would be a score of 100.0%

Congratulations! You got all of them!

Do you want to play again? no

Thank you for playing!

This is the first language that I was exposed to, and these two programs are one of the first that I created.

These two examples demonstrate the navigation of user inputs, boolean variables, simple arithmetic concepts, various variable assignments and iterations, random generators, matrix transposing, etc

Sorting algorithms have been studied in my academics, compared among their time complexities and which is best in practicality.

I've included Quick and Counting Sort, taking different approaches to "Divide and Conquer" among sorting arrays of large degree

public static int[] quick_sort (int[] array, int p, int r) {
if (p < r) {
int q = partition(array, p , r);
quick_sort(array, p, q - 1);
quick_sort(array, q + 1, r);
}
return array;
}

public static int partition (int[] array, int p, int r) {
int x = array[r];
int i = p - 1;
for (int j = p; j <= r - 1; j++) {
if (array[j] <= x) {
i++;
int tmp = array[i];
array[i] = array[j];
array[j] = tmp;
}
}
int tmp2 = array[i + 1];
array[i + 1] = array[r];
array[r] = tmp2;
return i + 1;
}

public static int[] counting_sort (int[] array, int k) {
int[] C = new int[k + 1];
int[] B = new int[array.length];
for (int i = 0; i <= k; i++) {
C[i] = 0; }
for (int j = 0; j < array.length; j++) {
C[array[j]] = C[array[j]] + 1; }
for (int i = 1; i <= k; i++) {
C[i] = C[i] + C[i - 1]; }
for (int j = array.length - 1; j >= 0; j--) {
B[C[array[j]] - 1] = array[j];
C[array[j]] = C[array[j]] - 1; }
return B;
}