Problem 1: Displaying Recursive Swirls
Review the solution to Programming Exercise 18.38 (Recursive tree) on Blackboard.
Then write a
program that will create recursive “swirls”. The user enters the order of the swirls and the number of
branches (straight lines) in each swirl. Swirls are recursively created at the end of each branch. The color
of each swirl is randomly chosen by the program.
You can accomplish this by having the paint method in your Pane class call a recursive
paintSwirl method:
paintSwirl(depth, getWidth() / 2, getHeight() / 2,
getHeight() / 4, Math.PI / 12);
The paintSwirl method that you
CPUTime
For this assignment, you will be writing a program determine the paths to connect all of the cities on a map.
You are to handin all files upon which your program is dependent, except RouterRunner.cpp, RouterRunner.h,
and CPUTimer.h. The grading script will copy those three files into your directory. You will find those three files, map
files, CreateFile.out, ElevationDiffs.out, barebones router.*, minimal Makefile, and my router.out. in ~ssdavis/60/p5.
Here are the specifications:
1. CreateFile.cpp is available and worth perusing.
1.1. The name of a data file reflects parameters used to create it. For example, map-20-1000-5.txt has 20 cities, a map
width and height of 1000, and was created using a seed of 5 for the r
Shell script
This is a group project (minimum 2 students, maximum 4 students in each group). The
project carries 50% of the overall grade. It is based on a practical demo (40%) and group
participations (10%).
The Task:
Based on the lab activities as well as external readings, each group needs to write a Bash
script that will implement menus using ‘dialog’ or any other utility. Create function for each
action, e.g., to show Calendar on screen create function show_calender( ). Menu-items and
action according to select menu-item are shown as follows:
Menu-Item
Purpose
Action for Menu-Item
Data analysis using matlab
Write a Matlab program performing the following operations:
1. Use the following parametrs values:
window_length = 128;
window type – hamming
overleap = 0 samples (no overleap between windows)
2. Read the rainm1.wav file as an input signal
3. Plot the time-domain waveform of input signal
4. Divide the signal into frames of length = 128 samples each. Multiply each frame by the
Hamming window and write the windowed frames into a matrix thus, that each row of this
matrix contains a single frame.
5. Analyse the signal by calculating the fft and amplitude spectrum of each frame.