2025 AP Computer Science FRQ Solutions
These are for the 2025 AP Computer Science A FRQ Questions
// 1a) public int walkDogs(int hour) { int available = company.numAvailableDogs(hour); int toWalk = Math.min(maxDogs, available); company.updateDogs(hour, toWalk); return toWalk; } // 1b) public int dogWalkShift(int startHour, int endHour) { int total = 0; for (int hour = startHour; hour <= endHour; hour++) { int walked = walkDogs(hour); int pay = walked * 5; if (walked == maxDogs || (hour >= 9 && hour <= 17)) { pay += 3; } total += pay; } return total; } // 2) public class SignedText { private String signature; public SignedText(String firstName, String lastName) { signature = (firstName.length() == 0) ? lastName : firstName.substring(0, 1) + "-" + lastName; } public String getSignature() { return signature; } public String addSignature(String text) { int sigLen = signature.length(); int textLen = text.length(); if (textLen < sigLen) return text + signature; if (text.substring(0, sigLen).equals(signature)) return text.substring(sigLen) + signature; if (text.substring(textLen - sigLen).equals(signature)) return text; return text + signature; } } // 3a) public Round(String[] names) { competitorList = new ArrayList<Competitor>(); int i = 1; for (String str : names) { competitorList.add(new Competitor(str, i)); i++; } } // 3b) public ArrayList<Match> buildMatches() { ArrayList<Match> matches = new ArrayList<Match>(); int end = 0; for (int i = competitorList.size() % 2; i < (competitorList.size()+1)/2; i++) { matches.add(new Match(competitorList.get(i), competitorList.get(competitorList.size() - 1 - end))); end++; } return matches; } // 4a) public SumOrSameGame(int numRows, int numCols) { puzzle = new int[numRows][numCols]; for(int r=0; r<numRows; r++) for(int c=0; c<numCols;c++) puzzle[r][c] = (int)(Math.random()*9)+1; } // 4b) public boolean clearPair(int row, int col) { int num = puzzle[row][col]; for (int r = row; r < puzzle.length; r++) { for (int c = 0; c < puzzle[0].length; c++) { if (r == row && c == col) continue; if (puzzle[r][c] == num || puzzle[r][c] + num == 10) { puzzle[row][col] = 0; puzzle[r][c] = 0; return true; } } } return false; }
Explore More From CS++…
Membership
For those hungry for more, our membership unlocks the full spectrum of over 500 questions, providing a comprehensive exploration of the diverse topics covered in our content and book. Delve deeper into the world of computer science, enhance your understanding, and master the principles that matter. Our membership also grants you exclusive access to detailed units from the comprehensive book and on our website. From foundational concepts to advanced topics, our units offer invaluable resources to support your learning journey. Elevate your exploration of computer science and make the most of your membership!
Ready to take the plunge into the world of computer science? Start Your Membership Today and enjoy free daily questions along with a treasure trove of over 500 more!
Subscribe to our Newsletter

AP Computer Science Principles/Teacher Certification Prep Course
Get full access to:
- Comprehensive explanations of the concepts
- 500+ Practice multiple choice questions
- Customizable Test Generator
- 90+ Curated videos
- 15 Projects, Tests, and Quizzes (includes all à la carte items)
- 12 Units of materials
- Built-in Block-to-JavaScript practice tool
- All future resources and questions for life!
AP Computer Science Principles Resources
Daily Lesson Plans
This material contains a comprehensive collection of 90-minute lesson plans for a semester’s worth of instruction in AP Computer Science Principles to serve as a companion to this textbook. Each lesson plan includes clear objectives, related requirements, a list of necessary materials, a detailed procedure, an assessment method, and a reflection section. The lessons are designed to be engaging and interactive, incorporating a variety of teaching techniques to help students understand and apply the key concepts of computer science. In order to modify the course for a year-long course with approximately 180 instruction days, each lesson plan can easily be spread across two days of instruction.
Textbook
Computer Science Principles: The Foundational Concepts of Computer Science, 5th Edition, Kevin Hare – Yellow Dart Publishing – 2024
Daily Practice Questions
Enjoy complimentary access to a daily selection of 5 random questions from our extensive pool of over 500 thoughtfully crafted questions – even if you’re not a member. Dive into the excitement of learning with these free, rotating questions that change every 24 hours, offering a taste of the variety and depth our content and book have to offer.