PracHub
QuestionsPremiumCoachesLearningGuidesInterview Prep
|Home/Coding & Algorithms/OpenAI

Build a Compose Rating Card

Last updated: May 6, 2026

Quick Overview

This question evaluates a candidate's ability to implement Android UI components and manage form state using Kotlin and Jetpack Compose, including building a custom rating control, integrating ViewModel-based state handling, input validation, and submission feedback.

  • medium
  • OpenAI
  • Coding & Algorithms
  • Android Engineer

Build a Compose Rating Card

Company: OpenAI

Role: Android Engineer

Category: Coding & Algorithms

Difficulty: medium

Interview Round: Technical Screen

Implement an Android rating card using Kotlin and Jetpack Compose. Requirements: - The card lets the user provide a star rating and a written comment. - The submit button must be disabled until both a rating and a non-empty comment are provided. - After a successful submission, show a success state or success message. - Jetpack Compose does not provide a built-in rating bar for this exercise, so implement the rating component yourself. - Prefer using a ViewModel to manage state. - Prioritize clear, readable code that can be understood without extensive explanation. You may assume a rating scale of 1 to 5 stars.

Quick Answer: This question evaluates a candidate's ability to implement Android UI components and manage form state using Kotlin and Jetpack Compose, including building a custom rating control, integrating ViewModel-based state handling, input validation, and submission feedback.

Related Interview Questions

  • Implement a Distributed Rate Limiter - OpenAI (medium)
  • Compute Plant Infection Time - OpenAI (medium)
  • Implement IP Address Arithmetic - OpenAI (hard)
  • Simulate Infection Spread on a Grid - OpenAI (hard)
  • Implement Social Follow Recommendations - OpenAI (medium)
OpenAI logo
OpenAI
May 3, 2026, 12:00 AM
Android Engineer
Technical Screen
Coding & Algorithms
21
0

Implement an Android rating card using Kotlin and Jetpack Compose.

Requirements:

  • The card lets the user provide a star rating and a written comment.
  • The submit button must be disabled until both a rating and a non-empty comment are provided.
  • After a successful submission, show a success state or success message.
  • Jetpack Compose does not provide a built-in rating bar for this exercise, so implement the rating component yourself.
  • Prefer using a ViewModel to manage state.
  • Prioritize clear, readable code that can be understood without extensive explanation.

You may assume a rating scale of 1 to 5 stars.

Submit Your Answer

Sign in to leave a comment

Loading comments...

Browse More Questions

More Coding & Algorithms•More OpenAI•More Android Engineer•OpenAI Android Engineer•OpenAI Coding & Algorithms•Android Engineer Coding & Algorithms
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.