Create a C# console exercise that validates seat counts, calculates totals and prints a structured summary.
A fictional workshop receives seat requests 2, 1, 5 and 3. Accept integers from 1 to 4. Each accepted seat costs 12 teaching units. Reject 5 and report accepted requests, accepted seats and total value. The exercise does not collect money.
| Request | Seats |
|---|---|
| A | 2 |
| B | 1 |
| C | 5 |
| D | 3 |
Start with variables whose names and types express the case. Print a known result before adding loops or validation. Use the provider’s current modules through the published course link; local SDK setup can differ by operating system. Record the actual version if you run the project.
Create a console project and print the price and allowed range.
Starter program
Record your result and evidence here or in a separate file.
The program builds in the learner’s local environment or the setup blocker is recorded honestly.
Resolve SDK setup before treating a source file as a successful run.
A small predicate makes the allowed range explicit. Reject invalid values before including them in totals. If input starts as text, use a parse method that can report failure rather than throwing for an ordinary mistake. Keep parsing and business validation separate so their failures can be explained.
Write IsValidSeats and test 0, 1, 4 and 5.
Validation function
Record your result and evidence here or in a separate file.
Only 1 and 4 pass those four boundary tests.
Use inclusive lower and upper comparisons.
Maintain counts for accepted and rejected requests separately from the sum of seats. A count of requests is not a count of seats. Calculate value from accepted seats only. The data are tiny integers, so the example does not attempt currency rounding or a financial ledger.
Loop over the four requests and calculate the three summary values.
Aggregation program
Record your result and evidence here or in a separate file.
Accepted requests=3, rejected=1, seats=6 and value=72.
Trace each row and update totals only inside the valid branch.
A robust console exercise should explain malformed text and continue or stop according to a documented policy. Avoid silent coercion. This case uses a fixed fixture for deterministic checks and an optional interactive extension. Keep expected output with the source so a reviewer can compare a real execution.
Add a non-integer input case and document the response.
Error-handling demonstration
Record your result and evidence here or in a separate file.
Malformed text is not treated as zero accepted seats.
Use an explicit parse-failure branch.
A complete handoff includes source, run commands, expected output and the actual execution status. A file is not evidence that a compiler ran. This preparation environment does not have the .NET SDK, so the bundled source is a learner-run reference with checks to perform locally.
Write the README and record local compile and run results when available.
Console project handoff
Record your result and evidence here or in a separate file.
The status accurately distinguishes supplied source from executed evidence.
Do not copy the expected output into an execution log.
Deliver the console source, boundary cases, malformed-input behavior, expected output and a real local run log when available. Extend the price to 13 and explain the changed total.
Invalid requests never contribute to totals and expected output is not mislabeled as executed output.
| Criterion | Points | Evidence |
|---|---|---|
| Evidence and correctness | 30 | Calculations, source use and results match the supplied case; limitations are honest. |
| Required artifacts | 30 | All five stage outputs and the capstone handoff are present and inspectable. |
| Reasoning and decisions | 20 | Choices, assumptions, alternatives and the case-specific critical condition are explained. |
| Reproducibility | 10 | A reviewer can follow the stated steps and distinguish expected from observed results. |
| Clear communication | 10 | Labels, units, structure and evidence references make the work easy to review. |
Score at least 80/100, supply every required artifact, and satisfy the path-specific critical condition. Rework missing evidence before marking complete.
Requests 2, 1 and 3 pass; 5 fails. Accepted requests are 3, seats total 6 and value is 72. The package includes a C# reference and expected checks. .NET execution was not performed in the preparation environment.
This provides a local educational source project, not a compiled application, payment system or cloud deployment.