# Question 1: Programming Fundamentals [5 Marks]

**Assessment:** FA1 Mock Hands-On (PMIS-FA-1-Generic-Mock)  
**Package / Class:** `pfusingjava1.Solution`

---

## Problem Description
Mr. Charles is developing a pharmaceuticals system to generate a verification token based on the input string. Write code in the given Java method to implement the requirement.

---

## Input Format
- A `String` containing at most one `$` character

---

## Rules
- Check whether the input string contains two parts separated by a `$` as mentioned in the format `<part1>$<part2>`
- If the format is valid (both parts are non-empty):
  - `part1` must contain only lowercase alphabets (`a-z`)
  - `part2` must contain only digits (`0-9`)
- Based on the validation:
  - If both conditions are satisfied, return `"<part1>_valid"`
  - Otherwise, return `"<part1>_invalid"`
- If the input string does not follow the required format (e.g. missing `$`, multiple `$`, or either part empty), return `"invalid"`

---

## Output Format
- Returns a `String`

---

## Constraints
- `input string length >= 1`

---

## Sample Input and Output

| Example | Input | Expected Output | Explanation |
|---|---|---|---|
| 1 | `"colpol$01"` | `"colpol_valid"` | Valid format, `part1` contains only lowercase alphabets, `part2` contains only digits |
| 2 | `"123e$456"` | `"123e_invalid"` | Valid format `<part1>$<part2>`, but `part1` contains digits |
| 3 | `"dolo650"` | `"invalid"` | Missing `$` character |
| 4 | `"crocin$50$"` | `"invalid"` | More than one `$` character / invalid format |
