Month: December 2016

JAVA PROJECT

COMPGC01 will assess your ability to demonstrate your programming knowledge,
purely in Java. It does not require a fully completed application to get a successful
mark. However, the more completed it is, the higher your marks will be as you will
see from the mark scheme below.
You have two project options on this COMPGC01 coursework to choose from:
1. Work individually on a restaurant billing management system.
2. Work in pairs on a robot simulator application.
Option 1 – Restaurant Billing Management System (individual project)
You are required to design and implement a restaurant billing management system
with the following minimum requir

Programming with Python

Assignment Rules:

  • Assignment Rules are exactly the same as the previous programming assignments.

Assignment Objective:

  • Assignments 3 and 4 are designed to help you prepare for a very common task in many jobs. Get hold of some data, and analyze the data to develop some insights. Python is a popular tool for this kind of tasks. Matplotlib is a free Python module for plotting your results. Although it is part of my syllabus, unfortunately, we may not get there in this course.
  • The input file is provided both as a txt file and as a xlsx file. You can use either. No extra points for using the xlsx file, but it will give you practice and gratifaction!

Q1: The input file (worldseries winners.txt), contains a record for each year with year,  winner, runner up, and score. Read all the questions before making any decisions.

  • You can build different dictionaries for different tasks. I

lab 11

Exceptions: Creating, Throwing, Catching
Exceptions are a programming tool that allow us to control disruptions in our program. They essentially
allow you to jump out of a series of nested method calls, back to a previous place in the execution, to handle
errors and other exceptional circumstances. Exceptions are an essential part of the Java platform, and you
need to know about them to use advanced Java techniques.
Before proceeding to the rest of this lab, review the following slides, which will be presented in the lab: PDF.

Object-Oriented Programming

For this assignment you are to begin by implementing the class Rectangle. Objects of his class, as implied by its name, are intended to model rectangles, where a rectangle is characterized by a length and width, each of which is a Length class object. (This Length class is the one implemented in the previous assignment.) The Rectangle class should include the following set of functions:

 

Constructors:

Rectangle();

Default constructor initializing an object to a width and length of 0;

Rectangle(Length ln, Length w);

Initialization constructor initializing an object to a length of ln and a width of w.

 

Access Functions:

Length getLength();

Length getWidth();

double getArea();

This function returns the area of a rectangle in square feet expressed as a doouble.

bool EqualAreaTo(Rectangle);

bool GreaterAreaThan(Rectangle);

bool LessAreaThan(Rectangle);

 

Mod

python program

Goals
Complete a project that demonstrates problem solving skills and logical thinking.
Demonstrate knowledge of Python programming concepts learned throughout the
semester.
Choose one of the two options below.
Option 1: Design Your Own
Description
You are free to design and implement a Python program of your own design.
If you choose this option, you must discuss your idea with the professor and before
starting your project.
Requirements
The program must consist of at least two (2) classes (each in its own file).
The p

Data Structures and Algorithms

You are to write a program to read a text file containing information about an undirected,
unweighted graph, create an adjacency matrix representation, and traverse the graph using
eitherbreadth-firstordepth-firstsearchmethods.
Followthesesteps:
1.Readatextfilethatcontainsthenumberofverticesonthefirstlinefollowedbytheedges.You
may assume that the vertices are represented by Strings A, B, C, etc. For instance, for the

followinggraph 

theinputtextfilewillbe(orderoftheedgesdoesn’tmatter):
5
E A
E B
A B

Build a Spellchecker

There are two problems in this project. Problem 1 is a regular assignment (50 points),
and Problem 2 is for extra credit (30 points). Problem 2 should be taken up only after
Problem 1 has been solved.
Problem 1. Build a basic spellchecker that will check for spelling errors in a given file
supplied by the user, and output a file with all the misspelled words highlighted by
special characters.
Part 1. Build a dictionary
The spellchecker will check spellings by comparing the words from the given input
file with the words in a dictionary. We will supply you with a few English novels to
build the dictionary. A word is a sequence o

Abstraction and Data Structures

We want to develop an application for a social network.
1. SocialNetworkException will be a class that extends RuntimeException and
it will be used to manage all possible error situations in the system.
2. Person class will keep information about a social network user. Specifically, its
name
(String), its age (int), its email (String) and the list of its hobbies (List
<String>). Note that one person cannot have a hobby twice. It will have the
following methods:
Constructor. It will receive its name (String), its age (int), its email
(String) and the list of its hobbies (List <String>) as parameters. The

graph

Problem 1: (15 points)
a. An automorphism of a graph G=(V,E) is any permutation f of V such that if (x,y) is an edge of
G, then (f(x), f(y)) is an edge in G. Write a backtracking algorithm that generates all
automorphisms of a given input graph G.
b. Let A[1:n,1:n] be a square matrix and C a given constant. A row-column selection of matrix
A is any subset of numbers such that no two numbers come from the same row or the same
column. A C-bound row-column selection is a row-column selection where the sum of its
elements is ≤ C. Write a backtracking algorithm that generates all C-bound row-column
selections of a given input matrix A[1:n,1:n], where C is a given input constant.

Inheritance and Virtual Functions

1. Objectives
In this lab you will gain experience with inheritance and virtual functions, which are powerful aspects of
C++ that allow new types of code re-use. You will do this by enhancing a program that can store,
manipulate, and draw a database of shapes.
2. Problem Statement
The bulk of the processing necessary to manage the database of shapes already exists, and without
changing this code you will add new functionality simply by adding three new classes (Circle, Rectangle
and Polygon). This is an example of adding new features to an existing framework. The framework
provides the “higher-level” decision making of the program, and you add new features by creating new<