Skip to content
 
 

Latest commit

 

History

6 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

Customer Order Reporter

A small console application that retrieves orders and generates a summary report.

Running

dotnet run

Requirements

  • .NET 10 SDK
  • IDE

What the application does

The application loads a set of customer orders and prints a summary report to the console:

Fetching orders...

Orders Retrieved: 7

Generating report...

Report
------------------------
Order Count:   5
Average Value: £204.10
Total Value:   £1,020.50

Cancelled orders should not be included in any report calculations.

API Reference

The application uses GraduateInterviewApp.Client (provided as a pre-built library in libs/). Below is a summary of the public API available.

ApiClient

Method Return Type Description
ApiClient(string dataFilePath) Constructor. Accepts the path to the orders data file.
GetOrders() List<Order>? Retrieves orders synchronously. May return null.
GetOrdersAsync() Task<List<Order>?> Asynchronously retrieves orders. May return null.

Order

Property Type Description
Id int Unique order identifier.
Amount decimal Monetary value of the order.
IsCancelled bool Whether the order has been cancelled.

Tip: Your IDE's IntelliSense will also show documentation for these types.

The Problem

The business has reported that the application occasionally crashes and sometimes produces incorrect reporting figures.

Investigate the issue(s) and make any fixes you believe are appropriate.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages