Build a University and Professor System

Medium Composition & Aggregation PRO
🔒 Login to Unlock

Problem Statement

Use aggregation. Build `University` and `Professor`. A Professor is passed into the University via an `hire(prof)` method. Print ‘Uni: [u_name]\nProf: [p_name]’.

Input Format

Two lines: University name then Professor name.

Output Format

Print the assigned structures on two lines.

Constraints

None

Sample Input

MIT
Dr.Smith

Sample Output

Uni: MIT
Prof: Dr.Smith

Explanation

A complete aggregation example. The professor exists completely independently of the university's lifespan.

Starter Code

class Professor:
    pass

class University:
    pass

if __name__ == '__main__':
    u_name = input().strip()
    p_name = input().strip()
    # Wire them up using aggregation
    pass

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