p3-ciphers

EECS 183 Project 3: Ciphers — Student Quickstart

Full specification (all details + sample runs): Full Spec

This page is a shorter, student-first version of the full spec. It keeps every requirement, but organizes them for faster onboarding.

Note: you will need to use the details in the full specification to complete the project.

0) Logistics (Dates, Grading, Submissions)

Due date: Friday, February 27, 2026 at 8:00 p.m. (accepted until 11:59:59 p.m.)

Autograder: Direct autograder link

Early bonus (autograder score):

Grading:

Submissions:

1) Big Picture (What You’re Building)

You will implement three ciphers and a menu-driven driver program:

2) Files You’re Given (and One You Create)

Download the starter files using this link.

File Purpose You Edit?
utility.h / utility.cpp helper string/char utilities Yes (.cpp)
caesar.h / caesar.cpp Caesar cipher Yes (.cpp)
vigenere.h / vigenere.cpp Vigenere cipher Yes (.cpp)
polybius.h / polybius.cpp Polybius Square Yes (.cpp)
ciphers.cpp user-facing menu + I/O Yes
start.cpp main() menu to run tests or ciphers No
test.cpp your tests (you must create this) Yes

Note: the project will not compile until test.cpp exists and defines startTests().

Important constants in utility.h:

3) Read the RME Comments Like Contracts

Every function declaration in the headers has an RME comment:

If your tests or ciphers() violate a Requires clause, the autograder will penalize you. Treat RMEs like a contract between the caller and callee.

4) Collaboration and Partnering

Allowed collaboration:

Not allowed:

If unsure, ask course staff first.

Partnering:

5) Suggested Implementation Order

This order reduces confusion and makes later functions easier:

  1. utility.cpp
  2. caesar.cpp
  3. vigenere.cpp
  4. polybius.cpp
  5. ciphers.cpp

6) Test Suite Basics

You must create test.cpp with a startTests() function. Write tests before you implement each function. There is no main() in test.cpp.

Full details: Test Suite

Testing notes:

Minimal test.cpp skeleton:

#include "utility.h"
#include "caesar.h"
#include "vigenere.h"
#include "polybius.h"
#include <iostream>
#include <string>

using namespace std;

void startTests() {
    // call your test functions here
}

Functions to test:

Bug IDs the autograder may report (names only):

7) Cipher Rules (Short Version)

Full details: Ciphers section

Caesar Cipher

Rule Meaning
Shift letters by key Wrap around A–Z and a–z
Preserve case Uppercase stays uppercase, lowercase stays lowercase
Non-letters unchanged Punctuation, spaces, digits stay the same
Decrypt = shift backward Use negative shift or reverse direction

Functions:

Vigenere Cipher

Steps:

Function:

Requires:

Polybius Square

Rules:

Functions:

Requires:

Note:

8) ciphers() Input Rules (Very Important)

Your ciphers() function must validate user input to avoid violating RMEs.

Full details: Error handling in ciphers()

Prompts (exact text + a single trailing space):

Choose a cipher (Caesar, Vigenere, or Polybius):
Encrypt or decrypt:
Enter a message:
What is your key:
The encrypted message is:
The decrypted message is:

Accepted cipher inputs (case-insensitive):

Accepted mode inputs (case-insensitive):

Error handling:

Input tips:

Sample runs: Sample Output

9) Function Dependency Map (Who Calls What)

Full details: Function Table

Function Should call Purpose
caesarCipher() shiftAlphaCharacter() Shift characters
vigenereCipher() toUpperCase(), removeNonAlphas(), shiftAlphaCharacter() Clean keyword, shift
mixKey() removeDuplicate() Build Polybius key
polybiusSquare() mixKey(), fillGrid(), findInGrid(), charToInt() Encrypt/decrypt via grid

10) Style and Autograder Reminders

Full details: Style Checklist

Style essentials:

Autograder reminders:

11) Recommended Timeline (Winter 2026)

Date Suggested milestone
Feb 9 Starter files set up; project compiles; spec read
Feb 13 utility.cpp implemented and tested
Feb 18 caesar.cpp implemented and tested
Feb 20 vigenere.cpp implemented and tested
Feb 23 polybius.cpp implemented and tested; start ciphers()
Feb 24 All code complete; debugging
Feb 25 Last day for 5% bonus
Feb 27, 2026 Final due

12) Fast Start Checklist

13) Warm-Up Questions (Quick Review)

14) Library Notes You Can Use

15) Optional Challenge