Previous Next
0 / 15
Module DEMO-33-71DEMO-OOP-33

Course Code Composer

DEMO-OOP-33 โ€ข Object Oriented Programming

Browser-only practice

Problem Statement

Create a helper class that uses string operations to build course identifiers and archive keys.

Input Format

Input is given as whitespace-separated tokens in this order:

  1. department code
  2. course number
  3. section code

Output Format

Print the exact report in this order:

  1. Code
  2. Archive Key

Sample Testcases

Submit runs every public testcase in this browser. Results and code never leave this device.

Sample #1
Public sample
cs
101
a
Code: CS101-A
Archive Key: cs_101
Input: department code = "cs", course number = 101, section code = "a".
Key calculation(s): code = "cs".toUpperCase() + 101 + "-" + "a".toUpperCase() | archiveKey = "cs".toLowerCase() + "_" + 101 | "Code: " + code = "Code: CS101-A".
Output:
Code: CS101-A
Archive Key: cs_101
Sample #2
Public sample
it
220
b
Code: IT220-B
Archive Key: it_220
Input: department code = "it", course number = 220, section code = "b".
Key calculation(s): code = "it".toUpperCase() + 220 + "-" + "b".toUpperCase() | archiveKey = "it".toLowerCase() + "_" + 220 | "Code: " + code = "Code: IT220-B".
Output:
Code: IT220-B
Archive Key: it_220

Web terminal

C, C++, Java, and Python run locally in a browser VM. No worker or visualizer is used.

Saved in this browser
Editor settings