Movie

Easy Classes & Objects
Solve in Playground →

Problem Statement

Write a C++ program defining a `Movie` class with title, director, and rating, and printing formatted movie information.

Input Format

Title (string), Director (string), and Rating (double).

Output Format

Print movie details.

Constraints

Rating between 0.0 and 10.0

Sample Input

Inception Nolan 8.8

Sample Output

Movie: Inception, Director: Nolan, Rating: 8.80

Explanation

Demonstrates object creation and formatting for media records.

Starter Code

#include <iostream>
#include <string>
#include <iomanip>

class Movie {
public:
    std::string title;
    std::string director;
    double rating;
    
    void display() {
        // Write your code here
    }
};

int main() {
    Movie m;
    if (std::cin >> m.title >> m.director >> m.rating) {
        m.display();
    }
    return 0;
}

Limits

  • Time Limit: 1s
  • Memory Limit: 256MB

Embedded C Programming

Updated: March 15, 2026
Intermediate

Embedded systems rely on efficient low-level programming to interact directly with hardware. In this course, you will learn how to write practical Embedded C programs used in real microcontroller-based systems. Rather than focusing only on theory, this course follows a practice-driven approach. Each lesson includes hands-on coding exercises that simulate real firmware development tasks used