Month: February 2017

Packet Train Histogram Generation

The Project

In this project you will be required to write a program in C/ C++, java or MATLAB thatgenerates a histogram that shows the percentage or relative frequency of packet trains thatare of a certain length.

Inputs to your program:

A “packet train” of length i is a sequence of i consecutive packets (with no gaps or idle slots in between).

In a given time slot the probability that a station has a single packet to transmit is p.  The probability of no packet in a slot (idle slot) is 1-p.  One packet fills one time slot. In your program you will need to use a random number generator function to simulate the probability that a slot has a packet or not.

For each of three values of p you will plot a histogram showing the relative frequency of packet trains of lenth i.  The horizontal axis of the histograms will be the packet train length (i=1,2,3…) and the vertical axis will be the recorded relative frequency.

You will generate histograms for p = 0.2

Interactive Computer Graphics

The goals of this assignment are
1. Lighting
2. Materials
For each programming assignment you should submit a zip file containing the code (and
MSVS/Xcode project/solution files) and a report stating: what you did; how you did it; any particular
features you want to draw attention to; any problems with the program that you know about.
In addition:
1. Your code must be original. You may discuss approaches with your colleagues but not how
to code it.
2. You must use GLSL (shaders) and vertex buffer objects (VBOs)
a. Therefore you may not use glVertex*, etc.

Parallelizing SPMV on GPU

In this project, you will implement three parallel versions of sparse matrix vec-
tor multiplication (spmv) on GPUs. SPMV is arguably the most important oper-
ation in sparse matrix computations [1]. You will exploit ne-grained parallelism
in SPMV and write a GPU program with the parallel programming interface called
You need to submit both code and report. The code comprises 60% and the
report comprises 40% of project 1 grade. In your report, you will need to present
the evaluation results of three different implementations as well as the strengths
and weaknesses of each implementation. You can also report any new ndings that
you have made

File System

The problem
In programming assignment 1, you implemented a Napster style file-sharing system where a
central indexing server plays an important role. In this project, you are going to remove the
central component and implement a pure distributed file-sharing system. An example of such a
system is the well-known Gnutella network.
You can be creative with this project. You are free to use any programming languages (e.g., C/
C++ or Java) and any abstractions such as sockets, RPCs, RMIs, threads, events, etc. that might
be needed. Also, you are free to use any machines such as your laptops or PCs.
If you are not familiar with Gnutella, the foll

data structure

Submission Instructions
Submit your answers on KEATS as a single pdf (recommended) or MS Word le (no other formats
will be accepted). The name of your le has to include your name and your KCL id number (the
number on your college ID card) in the following format (beginning with the last name):
LastName FirstName KCLid CW1
with the extension indicating the type of le. The submission deadline is given above. Late submissions
will not be accepted (unless a formal deadline extension request has been accepted by the Chair of
the Exam Board). The maximum size of a submission le is 2MB. Your submission must be typeset
in such a way that it properly prints on A4 paper. In particular, lines

newspaper data system

1. Use program arguments to specify a file name.
10 points
2. Use simple File I/O to read a file.
10 points
3. Create an abstract data type (ADT) to store information on a single newspaper story.
15 points
4. Create an ADT that abstracts the use of an array (or list) of newspaper stories.
15 points
5. Implement a program that allows the user to search the list of newspaper stories as
described below.
20 points
Develop and use a proper design.
15 points

Text File

Part 1 – Text file practice:

Create a class called TextFileDriver. In the main method of this class, write a program that gives and takes advice on programming. The program starts by writing a piece of advice to the console window. It then asks the user to type in a different piece of advice. The program then ends.

The next person to run the program receives the advice given by the person who last ran the program. The advice is kept in a text file and the content of the file changes after each run of the program.

You should use a text editor (such as TextEdit or Notepad) to enter the initial piece of advice in the file. For this lab, you may assume that the advice entered by the user is no more than one line in length.

Sample output (showing two executions of the program)

My advice is: Write a program every day!

Enter your advice: Practice, practice, practice


My advice is: Practice, practice, practice

Enter your advice: Think before you type!

File System

In this project, you will implement tools that will allow you to display all of the data and meta-data
associated with files in an ext2 file system. You will first create an ext2 file system. This file system will
not be created (as is conventionally done) in disk partitions but simply in a regular file. The file systems
should contain a large number of directories and files, including old, previously deleted files and
directories. You will implement three commands, one to display all the entries in a given directory
(current and old (deleted) ones). The second command will display the file contents and meta-data for a
given file. Finally, the last command will output information for all the deleted files an

javafx project

A Quadratic Equation Solver
Review the loan calculator example from Section 15.7. Also review the quadratic formula, naturally.
Create graphical user interface program for solving the quadratic equations ax2 + bx + c = 0. The user will
enter values for a, b, and c into text fields and press a “Solve” button. The program will then display a list
of the roots in a text field.
Your interface should look similar to the above. I suggest that you use a BorderPane as the root node of
the scene. Using an HBox to hold the four labels and four text fields works well, as does an HBox to hold
the “Solve” button. The unicode for a superscripted 2 is “\u00B2”. Recall from th

C++ Basic

From an early draft of his Canterbury tales, Chaucer removed an account of the pilgrims staying at Anne
Hoy’s1 inn, an establishment that served bad ale, but good cheese. The missing account explained how Anne
kept her high-quality cheese stacked on stools, the largest rounds underneath the smaller rounds, to stop
rats and mice from getting at them.
Occasionally the stool holding the cheese would need some maintenance (for example, the legs would
start to buckle under the weight), and Anne would shift the entire stack from one stool to another. Since
she could only move a single (hundred-pound plus) round of cheese at one time, and she refused to stack
a larger-diameter cheese round on a smaller one (the outer par