PracHub
QuestionsPremiumCoachesLearningGuidesInterview Prep
|Home/Software Engineering Fundamentals/Nielsen

Design a Train Ticket Booking System

Last updated: Jun 5, 2026

Quick Overview

This question evaluates a backend engineer's competency in object-oriented design, SOLID principles, API and service design, data modeling, concurrency control, and transactional reservation handling.

  • Nielsen
  • Software Engineering Fundamentals
  • Backend Engineer

Design a Train Ticket Booking System

Company: Nielsen

Role: Backend Engineer

Category: Software Engineering Fundamentals

Interview Round: Technical Screen

Machine-coding exercise, 90 minutes. Design and implement a train ticket booking system. The implementation should be close to working code and should follow object-oriented design, SOLID principles, and clean API boundaries. Core requirements: 1. Search trains between two stations. 2. Check seat availability for a train, date, origin station, and destination station. 3. Book tickets for one or more passengers. 4. Bonus: Cancel a booking and process a refund. Your solution should include: - Public APIs or service methods for search, availability, booking, and cancellation. - A data model or database schema based on the chosen datastore. - Clear domain objects, services, and repositories. - Handling of basic validation, errors, and concurrency issues such as two users trying to book the same seat at the same time.

Quick Answer: This question evaluates a backend engineer's competency in object-oriented design, SOLID principles, API and service design, data modeling, concurrency control, and transactional reservation handling.

Nielsen logo
Nielsen
May 20, 2026, 12:00 AM
Backend Engineer
Technical Screen
Software Engineering Fundamentals
0
0

Machine-coding exercise, 90 minutes.

Design and implement a train ticket booking system. The implementation should be close to working code and should follow object-oriented design, SOLID principles, and clean API boundaries.

Core requirements:

  1. Search trains between two stations.
  2. Check seat availability for a train, date, origin station, and destination station.
  3. Book tickets for one or more passengers.
  4. Bonus: Cancel a booking and process a refund.

Your solution should include:

  • Public APIs or service methods for search, availability, booking, and cancellation.
  • A data model or database schema based on the chosen datastore.
  • Clear domain objects, services, and repositories.
  • Handling of basic validation, errors, and concurrency issues such as two users trying to book the same seat at the same time.

Solution

Show

Submit Your Answer

Sign in to leave a comment

Loading comments...

Browse More Questions

More Software Engineering Fundamentals•More Nielsen•More Backend Engineer•Nielsen Backend Engineer•Nielsen Software Engineering Fundamentals•Backend Engineer Software Engineering Fundamentals
PracHub

Master your tech interviews with 8,500+ real questions from top companies.

Product

  • Questions
  • Learning Tracks
  • Interview Guides
  • Resources
  • Premium
  • For Universities
  • Student Access

Browse

  • By Company
  • By Role
  • By Category
  • Topic Hubs
  • SQL Questions
  • Compare Platforms
  • Discord Community

Support

  • support@prachub.com
  • (916) 541-4762

Legal

  • Privacy Policy
  • Terms of Service
  • About Us

© 2026 PracHub. All rights reserved.