CLICK TITLE FOR MORE INFO.
Web Programming Projects at LCSR (HTML, PHP, MySQL)
Introduction to Computer Science (JAVA Language)
-
Assignment 1 - This project contains Cellphone.java, LeapYears.java, Library.java, and Party.java.
The class Cellphone computes the monthly payment of a phone bill at a given plan, which is specified by
a user inputs. Class LeapYears determines weather a specified year is a leap year.
Class Library calculates the total cost of an overdue book. Class Party computes the total cost of all the items
needed for a party.
Download
-
Assignment 2 - This project contains NthPrime.java, Savings.java, Taxes.java,
and TwoSmallest.java. Class Savings determines how long it will take for a savings account to double
in worth. Class TwoSmallest takes in a set of numbers and determines which are the two smallest numbers in the set.
Class Taxes computes the amount of taxes a person has to pay. Class NthPrime returns the nth prime number, which n is
specified by user input.
Download
-
Assignment 3 - This project contains Names.java, WordCount.java, MiddleInitials.java, and
Compress.java. Class Names alphabetizes a list of three people's names. Class WordCount counts all the words of a specific length
in a given sentence. Class MiddleInitials ask the user for a person's full name and outputs a version of their name where the middle name
is replaced by initials. Class Compress replaces repetitive sequences of identical data items with short tokens that
represent entire sequences.
Download
-
Assignment 4 - This project contains MonthlyCalendar.java and Schedule.java.
Monthly.java maintains a person's appointment calendar for one specific month. It keeps a description of each
appointment.Schedule.java maintains a student's course schedule for one semester.It keeps track the names of each course taken,
the days and times at which each course is scheduled, and the credits earned for each course.
Download
-
Assignment 5 - This project contains Course.java and FlightReservations.java. Class Course maintains
the roster for a college course. It records the grades for all students in one course for one semester. Class FlightReservations
manages reservations and a seating chart for a single flight.
Download
-
Assignment 6 - This project contains IntListOperations.java and AddressBookOperations.java. IntListOPerations
contains methods to modify a linked lists such as replace a value, add at a certain positions, add before every occurrence of
a certain value in a list, remove after a certain value, remove before a certain value, and find the union of two lists.
Class AddressBookEntry maintains a user's e-mail address book and serves to record all information
about one of the user's contacts.
Download
-
Assignment 7 - This project contains MathRec.java, OneListRec.java, and TwoListRec.java.
Class MathRec implements method to power a number, find the logarithm of a number, and converts a string into integer
using recursion only. OneListRec contains methods for returning a string containing the values in the input list, separated by commas,
returning same as the first method but in reverse order, and removing every occurrence of value from a list. TwoListRec contains method common which returns a linked
list containing all values that are common to both lists, difference which returns a linked list containg all values that are in the first list, but not in the second list,
and mergeUnique which returns a linked list containing all values in both lists with no duplicates values.
Download
-
Assignment 8 - This project contains RentalCar.java, Fraction.java, and Set,java. RentalCar makes a reservation
for a rental car. It contains method for making a reservation, checking a reservation before picking up the car,
changing an existing reservation, and returning the car after use. Class Set mimic a mathematical set, a group of values.
Class Fraction has instances that represent unsimplified fractions of the form a/b.
Download
-
Assignment 9 - This project contains many classes such as Blackjack.java, Card.java,
Deck.java, Hand.java, and Player.java.
This program simulates a game of blackjack.
Download
Data Structures Projects (JAVA Language)
- Simplified Solitaire Encryption - This project implements a
simplified version of the Solitaire Encryption algorithm designed
by Bruce Schneier. The algorithm encrypts a message using a deck of cards, jokers are included.
Implementations: A circular linked list is used to store the
deck of cards. Each card is represented by a numeric value. For example 1 is
an Ace of Spade, 2 is a two of Spade and so on. Various of functions are implemented for shuffling
the deck of cards. After shuffling, the deck of cards is used to generate
a keystream. The key stream is used for encrypting a message. Each character in a message is
associated with a key.
Example: (Using deck.txt) To encrypt a message, add the ASCII value of each character (A-Z is 65-90) in message
with its associated key. For values that exceed 90 after adding, subtract 26 until the value is in the range of 65-90.
Lastly, convert these new values from ASCII to character. The exact same process is followed for decryption, but in reverse.
To decrypt, subtract the keystream from the ASCII values of its characters. For values below 65 after subtracting, add 26 until
the value is in the range of 65-90.
ASCII Values
A = 65 |
B = 66 |
C = 67 |
D = 68 |
E = 69 |
F = 70 |
G = 71 |
H = 72 |
I = 73 |
J = 74 |
K = 75 |
L = 76 |
M = 77 |
N = 78 |
O = 79 |
P = 80 |
Q = 81 |
R = 82 |
S = 83 |
T = 84 |
U = 85 |
V = 86 |
W = 87 |
X = 88 |
Y = 89 |
Z = 90 |
The Encryption Process
Message |
H |
E |
L |
L |
O |
W |
O |
R |
L |
D |
ASCII Values |
72 |
69 |
76 |
76 |
79 |
87 |
79 |
82 |
76 |
68 |
Keystream |
7 |
16 |
5 |
8 |
8 |
15 |
26 |
9 |
14 |
23 |
ASCII + Key |
79 |
85 |
81 |
84 |
87 |
102 |
105 |
91 |
90 |
91 |
Mod Result |
79 |
85 |
81 |
84 |
87 |
76 |
79 |
65 |
90 |
65 |
Encryption Result |
O |
U |
Q |
T |
W |
L |
O |
A |
Z |
A |
|
The Decryption Process
Message |
O |
U |
Q |
T |
W |
L |
O |
A |
Z |
A |
ASCII Values |
79 |
85 |
81 |
84 |
87 |
76 |
79 |
65 |
90 |
65 |
Keystream |
7 |
16 |
5 |
8 |
8 |
15 |
26 |
9 |
14 |
23 |
ASCII - Key |
72 |
69 |
76 |
76 |
79 |
61 |
53 |
56 |
76 |
42 |
Mod Result |
72 |
69 |
76 |
76 |
79 |
87 |
79 |
82 |
76 |
68 |
Decryption Result |
H |
E |
L |
L |
O |
W |
O |
R |
L |
D |
|
Download
-
Interval Tree - This project implements a data structure called
the Interval Tree. This allows one to efficiently find intersections of line segments.
Will update soon ...
Download
-
DOM Tree - This project builds a Document Object Model (DOM) for a given
HTML file, and process it with a set of given input commands that will transform
the tree.
Will update soon ...
Download
-
Little Search Engine - This program gathers and index keywords
that appears in a set of plain text documents, and searches for user-input keywords
against the index and returns a list of matching documents in which these keywords occur.
Will update soon ...
Download
-
Minimum Spanning Tree - This project implements Tarjan and Chertion's round-robin
algorithm for finding the minimum spanning tree of a weighted undirected graph.
Will update soon ...
Download
Computer Architecture Projects (C Language)
- Word Statistics - This program counts the number of
lines, counts the number of words and keeps track of all the different
palindrome words used in a file.
Will update soon ...
Download
-
Data Representation and Operations - The programs perform addition,
subtraction, and multiplication of numbers of different bases such as binary
, octal, decimal, and hexadecimal. It also checks for overflow on a 32-bit
computer.
Will update soon ...
Download
-
Assembly Language Programming - These programs are written in x86 Assembly Language.
They will only work on 32-bit processors. Two programs are implemented to compute the nth
fibonacci number and the sum of n consecutive integers. Checking for overflow is done in these programs.
Will update soon ...
Download
-
Caching - This program simulates the operation of a direct mapped cache. It implements a
write-through cache and a write-back cache using Least Recently Used (LRU) policy.
Will update soon ...
Download
Systems Programming (C language)
-
Geometry - A menu-driven program that performs 2D and 3D geometric
computations. The program calculates area, volume, and surface area of the following shapes:
triangle, rectangle, regular n-sided polygon, circle, ellipse, pyramid (square base), cone,
box, circular cylinder, elliptical cylinder, sphere, and hemisphere.
Will update soon ...
Download
-
Stocks - A menu-driven programs that simulates a stock market.
The program allows a user to create new stocks to the overall list of stocks being tracked,
enter a change in the price of a stock, create a new mutual fund and add existing stocks to it
,add or remove stocks from a mutual fund, view the current price and history of price changes for a given stock or
fund, create a portfolio, view contents of a portfolio, and buy or sell stocks from a selected portfolio.
Will update soon ...
Download
-
Tokenizer - This program implements a tokenizer, which returns a token every time
the function is called. It accepts two parameters: a set of delimiters or separator characters
and a string to be parsed.
Will update soon ...
Download
-
Sorted List - This program implements a sorted list. A comparator function is
implemented to understand the type of objects to be sorted, which the type is unknown
at compile time. An iterator is used to check if the list is indeed sorted.
Modifications can be made to the sorted list such as insertion and deletion. These complications
must be resolve by creating a flexible iterator.
Will update soon ..
Download
-
Indexer - This project implements an indexing program which builds
an inverted index. Given a set of files, an indexer will parse the files and create a
mapping from the set of terms in the files to the files themselves.
Will update soon ...
Download
-
Search - This project simulates a grep utility. Previous programs are used here:
Tokenizer, Sorted list, and Indexer. The search tool will load an inverted index produced by
Indexer into memory and use it to answer users' search queries.
Will update soon ...
Download
-
Multithreaded Book Order System - This project implements a multithreaded book order simulation
program. It involves a producer-consumer program with multiple producers and multiple consumers.
Mutexes, semaphores, and condition are used to protect and manage shared data structures.
Will update soon ...
Download
-
Error detecting malloc() - This project implements malloc() and free()
library calls for dynamic memory allocation that detect common dynamic memory errors.
Will update soon ...
Download
Principles of Programming Languages (Scheme, Prolog, Python)
- Introduction to Scheme - This contains many small functions in Scheme. It contains
functions that returns the smallest number in a list, filters a list and returns a new list
containing even numbers, implements a deep level recursion on a list, returns a list of data associated
with elements of a given list, adds a command by-lines to format "little language".
Download
-
Patterns - This project is done in Scheme. It defines functions
for defining and printing patterns of characters on the screen. A pattern is
represented by a list. The last element of that list is a function.
Download
-
Introduction to Prolog - This project contains many small programs that defines
predicates. The programs include creating a set of prolog facts and rules for several statements
,doubling a list, removing an element from a list, permuting a given list, checking if
a list is in order, and sorting a list by using the in-Order and permutation predicates.
Download
-
Graphing Color - This project is done in Prolog. It implements an algorithm
for coloring graphs and it tests if a graph is colorable.
Download
-
Introduction to Python - This project contains many small functions. The functions include
squaring every element in a list using list comprehension and both lambda and map, encrypting a string
by writing down every other character of a string and appending the remaining letter to the end result, decrypting
the string formed in encrypt, and creating a tic-tac-toe board.
Download
Numerical Analysis (MATLAB Language)
-
Taylor Polynomial - This program evaluates the linear and quadratic Taylor Polynomial
approximations for f(x) = exp(x) at a range from -1.0 to 1.0. It also graphs these data sets and
computes the error bound. Taylor Polynomial formula is pn(x) = f(a) + (x - a)*f'(a) + ((x-a)^2)/2! *
f''(a) + ... + ((x-a)^ n)/n! * f^n(a). The error bound formula is |f(x)-pn(x)|= (x-a)^(n-l)/(n+1)! * f^(n+1)[c],
where a < c < x.
Download
-
Newton's Method - This implements Newton's method to find the roots of a polynomial.
It uses Horner's Algorithm to compute the value of a polynomial and its derivative at a given value.
Horner's Algorithm reduces the number of multiplications to compute a polynomial. The formula for Newton's Method
is xk+1 = xk - f(x)/f'(x), where k is the number of iterations. The general formula of Newton's method is the
fixed point iteration formula g(x)= x - f(x), where g(x) = x.
Download
-
Least Squares Approximation - This program seeks an approximation with a small average
error over the interval of approximation. Given a set of data points (xk,yk), approximate
y(x) = c1@1(x)+ ... + cn@n(xk), where @ is the Legendre Polynomial basis function or the monomial basis function.
The condition number, which indicates how much the solution of a problem can change
in proportion to small changes in the data, is also computed in the program.
Download
-
Polynomial Interpolation - This program finds and evaluates a polynomial function
whose graph goes through a set of given points. F(x) approximated over an interval [a,b]
by sequence of interpolating polynomial pn(x) of increasing degree, does max[a,b] |f(x)-p(x)| approach 0
as n goes to infinity. Given a function, polynomial interpolation gives an approximation of the curve.
Download
Calculus - Multivariable and Differential Equations (Maple Language)
Multivariable Calculus
-
Vector Computation - For this lab, the data will consist of coordinates for three
points p, q, and r, in R^3. This program computes the vectors pq, pr, and v. Vector v is determined
by the cross product of pq x pr.
Download
-
Vector-valued function - The components of the vector function will be various
combinations of sine and cosine. This could be the theoretical description of the backbone of a
large molecule. This program computes the length and curvature of the vector function.
Download
-
Curves and Surface- This program determines whether F(x,y)=0 is a
hyperbola, a parabola, or an ellipse and finds the values for which y is (A,y) on the
curve F(x,y)=0. It also determines what kind of surface G(x,y,z) is. The possible surfaces
are a paraboloid, an ellipsoid, or a hyperboloid and finds the values for which z is (B,C,z)
on the curve G(x,y,z) = 0.
Download
-
Region in Plane - This program finds the center of gravity(centroid) of the region, the area of the region
, the volume of the region, and the total mass of the material filling region.
It also displays the region in space and in the plane graphically.
Download
Differential Equations
-
Exact and Approximate Solutions of Differential Equations The program
finds exact and approximate solutions of differential equations and initial value
problems, finding both solutions in the form of explicit functions, solutions defined only
implicitly, and graphic representations of approximate solutions.
Download
-
Numerical Methods This program approximate the solution of differential equations
by numerical methods and superimpose these solutions on the direction fields. This allows us to extend
our understanding of the solutions of differential equations for which
a closed form solution is not available.
Download
-
The Pendulum This program examines differential equations modeling free oscillations.
The effect of damping in the linear model and in the nonlinear model are compared with each other.
Download
-
Linear Systems - This program finds eigenvalues and eigenvectors of matrices,
and solve systems of linear algebraic equations as well as systems of first-order linear
differential equations.
Download
-
A Nonlinear System - This program examines the phase plane of an autonomous nonlinear
system of two differential equations of the form x'(t) = F(x,y) and y'(t) = G(x,y).
Download
Projects