October 17, 2015
GMU cs112 solution

This semester you will be writing a program that models elements of recognizing and creating characters. Optical character recognition is an important area of research that allows photographs or printed documents to be digitized; by doing so, these documents are made available for machine-based searching. On the flip side, http://en.wikipedia.org/wiki/CAPTCHAis a system for differentiating between humans and computers: the goal here is to generate a non-machine readable image that a human could identify. CAPTCHA helps reduce the amount of spam on the Internet.

We will implement a highly limited type of image matching, processing, and creation this semester. Rather than write this project at once, we will break the project down into several two-week sub-projects that are due throughout the semester. The rest of this document will detail the first such assignment.


  • None at this time

This final assignment will ask you to write some code that will help you determine if a pixel is part of a number. You will need to copy your project 3, 4, and 5 solutions into the same directory where you save your files for this project.

You will have to do the following for this assignment:

  • Complete the methods of the Banner class.
  • Write a main function in a file called project5.py.

September 6, 2015
ESE 224 minesweep 实现

ESE 224 Spring 2015 Course Project Description

Over the course of this semester, you learn various coding concepts in C++ that are applicable to programming in general. This class project is designed to show you how many of these concepts can be used together in a single application and will test your familiarity with programming these concepts. This project is intended for 2-4 people groups.

We will provide a rigid skeleton guide which you MUST follow, but how to implement components in the skeleton is your decision. This means that any public method signature should not be modified (its return type, name, and parameters). However, you are free to remove, add, or edit any private methods you feel necessary. The private methods are included as a guideline to structuring and organizing your code. The private variables should also not be modified, as much of the public functions rely on these private variables. This means we (i.e., TAs) should be able to use our own GUI code to run your minesweeper class, and your GUI class to run our minesweeper. Following this skeleton allows us to show you how a program is typically structured while allowing for your own creativity to shine. You should describe your algorithm/implementation in comments in the code as well as in a final report.

Grading will be roughly divided into 80% for the actual program, 20% for a final report, and an extra 20% for bonus. The actual program should be functional and free of basic errors to obtain credit. Extra points for style will be given for succinct, smart, and readable (spaces and indentation) code as well as good documentation and comments. Every submission should include ALL relevant header files (*.h) and source code (*.cpp) as well as the report. These should compile on GCC without exception. Production code that is unable to compile is obviously unacceptable in industry, and the same mindset should apply here.

July 12, 2015
c++ programm assignments

This project is the main assessment of this subject. It is worth 40% of your total

assessment. You are required to write a C++ program to solve all problems. All work is

to be completed individually. If parts or all of the source code you submit is not your own

work, you will receive ZERO.

Part 1. Design

This first part is worth 20% of you total assessment. It is consist of 5 tasks. You need to


• Programming object list

• Algorithm

• C++ Coding

Task1: Miles per Gallon.

A liter is 0.264179 gallons. Write a program that will read in the number of liters of

gasoline consumed by the user’s car and the number of miles traveled by the car, and

will then output the number of miles per gallon the car delivered. You must show the

outputs as given in the example. You must show the numbers in fixed point left justified

and in three decimal places as in the example.

July 6, 2015
Grocery Store Simulation

Assignment 1 – Grocery Store Simulation

Marking scheme posted!

Sample tests posted! (See the unit test file for details.)

Grocery stores often have a difficult task: they must determine how many employees to hire to staff checkout lines during varying levels of customers throughout the day. Too few open lines means customers spend time angrily waiting; too many, and the store loses money paying its employees. It’s also important to get the right mix of regular and express checkout lines, and perhaps even self-serve lines. Which combination is best depends on what kind of customers the store has.

In this assignment, you’ll build an event-driven simulation for a grocery store, which will model customers using different types of checkout lines. Your finished product will be able to set up the simulation with data from file inputs, simulate a sequence of events, and report timing statistics after the simulation is complete that will help determine how successful the checkout line set-up was for that set of customer arrivals.

Simulation description

Read through the following description carefully. Your overall task for this assignment will be to create a program which fulfills the requirements here.

The grocery store

Here we describe all the things that your simulation will keep track of. There are many other things that it won’t keep track of that might be important, such as which customers have children with them and how tired each cashier is, but are beyond the scope of the simulation.
Simulate only what we describe here.

A grocery store must keep track of all customers and checkout lines in the store, giving each customer a unique string identifier.

Customers go to a checkout line to pay for their items. The number of items influences how long it takes for the customer to check out, but what those items are does not, and so the simulation should only keep track of the number of items each customer has.