---
title: "AP Computer Science A Class Design FRQ Practice"
description: "27 Class Design questions written in the AP format, each scored part by part."
canonical: "https://fiveable.me/ap-comp-sci-a/frqs/class-design"
type: "frq-type-practice"
subject: "AP Computer Science A"
---

# AP Computer Science A Class Design FRQ Practice

## What the Class Design FRQ asks

Class Design is FRQ 2 on the AP Computer Science A exam. From a scenario, a specification, and a table of example calls, you write a complete class: the header, private instance variables, a constructor, and at least one method.

- **90 min**: for all four FRQs
- **7 points**: of the section’s 25
- **45%**: of your score, for all four FRQs

| Part | What it asks | Points |
| --- | --- | --- |
| A: The full class | Seven one-point checks: class header, instance variables, constructor and method headers, then method logic and return values | 7 |

## How Class Design FRQ practice works

1. **Read the specification.** The scenario and the table of example calls and results, laid out the way the exam shows them.
2. **Write on a 22-minute timer.** A pace that fits all four questions into the 90-minute section. Pause it or turn it off, and your response saves as you go.
3. **Submit for a score out of 7.** Your response is scored against the scoring guidelines written for that question. Your first score is included.

## All 27 questions

### Unit 3: Class Creation (26)
- [String manipulation through combination and wrapping](/ap-comp-sci-a/frq-practice?id=69680b06d224518981a301ec&type=frq-2-class-design)
- [Simulating game spinner with sectors and methods](/ap-comp-sci-a/frq-practice?id=698a8dfd92eb6995a7632fd9&type=frq-2-class-design)
- [Event attendance tracking and management system](/ap-comp-sci-a/frq-practice?id=698a8e6e92eb6995a7632fdb&type=frq-2-class-design)
- [Astronaut movement between space locations](/ap-comp-sci-a/frq-practice?id=698a8f4592eb6995a7632fdc&type=frq-2-class-design)
- [Sports team win-loss record tracking system](/ap-comp-sci-a/frq-practice?id=698a8fae92eb6995a7632fdd&type=frq-2-class-design)
- [User physical activity tracking and data management](/ap-comp-sci-a/frq-practice?id=698a900392eb6995a7632fde&type=frq-2-class-design)
- [Game lobby player tracking system](/ap-comp-sci-a/frq-practice?id=698a90e092eb6995a7632fdf&type=frq-2-class-design)
- [Text message sanitization and formatting with string replacement](/ap-comp-sci-a/frq-practice?id=698a916292eb6995a7632fe0&type=frq-2-class-design)
- [Payroll calculation system for employees](/ap-comp-sci-a/frq-practice?id=698a91ff92eb6995a7632fe1&type=frq-2-class-design)
- [Text label generation and formatting systems](/ap-comp-sci-a/frq-practice?id=698a927392eb6995a7632fe2&type=frq-2-class-design)
- [Unique job identifiers and batch code assignment](/ap-comp-sci-a/frq-practice?id=698a942b92eb6995a7632fe3&type=frq-2-class-design)
- [Robotic space probe planetary exploration simulation](/ap-comp-sci-a/frq-practice?id=698a949992eb6995a7632fe4&type=frq-2-class-design)
- [Job applicant profiles with name and performance scores](/ap-comp-sci-a/frq-practice?id=698a94fd92eb6995a7632fe5&type=frq-2-class-design)
- [Event ticket management system implementation](/ap-comp-sci-a/frq-practice?id=698a957092eb6995a7632fe6&type=frq-2-class-design)
- [Unique alphanumeric code generation system](/ap-comp-sci-a/frq-practice?id=698a95dc92eb6995a7632fe7&type=frq-2-class-design)
- [Status labels for file naming and organization](/ap-comp-sci-a/frq-practice?id=698a963b92eb6995a7632fe8&type=frq-2-class-design)
- [Ticket generation and sales tracking system](/ap-comp-sci-a/frq-practice?id=698a977492eb6995a7632fe9&type=frq-2-class-design)
- [Standardized email address generation for employees](/ap-comp-sci-a/frq-practice?id=698a97e092eb6995a7632fea&type=frq-2-class-design)
- [Email address generation and domain management](/ap-comp-sci-a/frq-practice?id=698a984392eb6995a7632feb&type=frq-2-class-design)
- [Book identification codes and library labels](/ap-comp-sci-a/frq-practice?id=698a999b92eb6995a7632fec&type=frq-2-class-design)
- [Text document watermarking system design implementation](/ap-comp-sci-a/frq-practice?id=6a95b49e2dab8b240771683c&type=frq-2-class-design)
- [Version tracking system for software applications](/ap-comp-sci-a/frq-practice?id=6a95b5c72dab8b2407716846&type=frq-2-class-design)
- [Text-based smart home device control system](/ap-comp-sci-a/frq-practice?id=6a95b6112dab8b240771684c&type=frq-2-class-design)
- [Customer loyalty card points and rewards](/ap-comp-sci-a/frq-practice?id=6a95cb2e84aabfea54f3c04e&type=frq-2-class-design)
- [Coffee machine water management and brewing operations](/ap-comp-sci-a/frq-practice?id=6a95cb7684aabfea54f3c052&type=frq-2-class-design)
- [Mobile phone data usage tracking and limits](/ap-comp-sci-a/frq-practice?id=6a95cc0984aabfea54f3c059&type=frq-2-class-design)

### Unit 4: Data Collections (1)
- [Data Collections: FRQ 2 – Class Design unit practice](/ap-comp-sci-a/frq-practice?id=6aab9a1aa5ebaaa95b9ee9b0&type=frq-2-class-design)

## Sample question

**String manipulation through combination and wrapping**

Opening Text: 2. This question involves the TextCombiner class, which models a pair of strings that can be combined or wrapped within other strings. You will write the complete TextCombiner class, which contains a constructor and two methods.

Constructor Intro: TextCombiner objects are created by calls to a constructor with two parameters.

Constructor Parameters:
  - The first text segment to be stored (Precondition: The string is not null and has a length greater than 0)
  - The second text segment to be stored (Precondition: The string is not null and has a length greater than 0)

Method Specifications:
  Method Name: getCombinedText
  Description: Returns a string containing the two stored text segments combined according to specific rules.
  Behavior Rules:
    - If the last character of the first segment is equal to the first character of the second segment, the method returns the concatenation of the first segment and the substring of the second segment starting at index 1 (removing the duplicate character).
    - Otherwise, the method returns the concatenation of the first segment and the second segment.
    - The comparison of characters is case-sensitive.
  Return Description: A string representing the combined text.

insertInto:
  Method Name: insertInto
  Description: Returns a new string created by inserting the combined text into a wrapper string.
  Parameters:
    - wrapper - a string into which the combined text will be inserted
  Behavior Rules:
    - The method first calls getCombinedText to obtain the combined string.
    - It calculates the insertion index as wrapper.length() / 2.
    - It returns a new string formed by the substring of wrapper from index 0 to the insertion index, followed by the combined string, followed by the rest of the wrapper.
  Return Description: The wrapper string with the combined text inserted in the middle.

Execution Table:
  Headers: Statement | Return Value | Explanation
  TextCombiner t1 = new TextCombiner("dog", "gone"); |  | t1 is initialized with "dog" and "gone".
  t1.getCombinedText(); | "dogone" | The last letter of "dog" ('g') matches the first letter of "gone" ('g'). They are merged.
  t1.insertInto("1234"); | "12dogone34" | "dogone" is inserted into "1234" at index 2 (4 / 2).
  TextCombiner t2 = new TextCombiner("red", "car"); |  | t2 is initialized with "red" and "car".
  t2.getCombinedText(); | "redcar" | The last letter of "red" ('d') does not match the first letter of "car" ('c'). They are concatenated normally.
  t2.insertInto("[]"); | "[redcar]" | "redcar" is inserted into "[]" at index 1 (2 / 2).

Final Prompt: Write the complete TextCombiner class. Your implementation must meet all specifications and conform to the examples shown in the table.

## Questions

**How many responses can I get scored?**

You can read every question without a plan. Your first scored response is included. A plan unlocks unlimited scoring.

**Do I write the whole class?**

Yes. Write the class header, the private instance variables, the constructor, and each method the specification asks for, fully implemented.

**How is FRQ 2 different from FRQ 1?**

FRQ 2 asks you to design a whole class from a specification. FRQ 1 gives you the class and asks for two methods inside it.

**Can I type Java in the editor?**

Yes. Type your code the way you would on the digital exam. The Java Quick Reference is available while you write.

**Are these real College Board questions?**

No. We wrote them in the AP format, with a specification and examples table, and wrote scoring guidelines for each one.

## Related

- [Class Design FRQ exam guide](/ap-comp-sci-a/ap-computer-science-a-exam/ap-comp-sci-a-frq-2-class-design/study-guide/ap-comp-sci-a-frq-2-class-design)
- [AP Computer Science A Methods FRQ practice](/ap-comp-sci-a/frqs/methods-and-control-structures)
- [AP Computer Science A ArrayList FRQ practice](/ap-comp-sci-a/frqs/arraylist)
- [AP Computer Science A 2D Array FRQ practice](/ap-comp-sci-a/frqs/2d-array)
- [AP Computer Science A FRQs](/ap-comp-sci-a/frqs)
- Any question by id: the `get_frq` tool on the [Fiveable MCP server](/mcp/docs)

## About This Document

Canonical Fiveable pages are available as Markdown at the same path plus `.md`.

- [llms.txt](https://fiveable.me/llms.txt): index of Fiveable's sections and URL patterns
- [llms-full.txt](https://fiveable.me/llms-full.txt): complete subject and unit listing
- [MCP server](https://fiveable.me/mcp): call Fiveable as tools instead of fetching pages (`https://fiveable.me/api/mcp`)
- [MCP server for AP teachers](https://fiveable.me/mcp/teachers): a teacher's classes, assignments and AP-rubric grading (`https://fiveable.me/api/mcp/teacher`)
