How fundamentos-programacion-redes-datos/ae1-bim1-aa2025 works
Project Type and Purpose
• This is a small console‐based billing and sales analysis application.
• It captures multiple customer orders for suits, applies tiered discounts, stores per‐customer data in parallel arrays, and computes summary statistics (average sale, max/min sale).
High‐Level Components
a. User Interface (CLI)
• Prompts for customer name, number of suits, unit price
• Loop control: “continue entering customers?”
b. Input Processing Module
• Reads and validates user input
• Triggers the business logic
c. Business Logic Module
• Calculates subtotal = quantity × unit price
• Applies discount based on quantity (10%, 20%, 40%, 60%)
• Computes discount amount and final total
d. Data Storage Module
• Four parallel 1D arrays:
– Customer first names
– Customer last names
– Quantities purchased
– Unit prices
– Calculated totals
e. Reporting Module
• Iterates arrays to display each customer’s record (name, qty, price, discount, total)
• Computes and displays average sale, highest sale, lowest sale
Relationships and Data Flow
• After storing each record, loop back to CLI for the next customer.
Key Architectural Patterns
• Modular separation: input vs. calculation vs. storage vs. reporting
• Simple pipeline/data‐flow architecture
• Use of parallel arrays for in‐memory storage