String com os detalhes especificados:
119 | ///
120 | ///PEDIDO - NÚMERO - DD/MM/AAAA
121 | ///01 - DESCRICAO DA PIZZA
122 | ///02 - DESCRICAO DA PIZZA
123 | ///03 - DESCRICAO DA PIZZA
124 | ///
125 | ///TOTAL A PAGAR: R$ VALOR
126 | ///
127 | public string Relatorio() {
128 | StringBuilder relat = new StringBuilder("XULAMBS PIZZA - Pedido ");
129 | relat.Append($"{_idPedido:D2} - {_data.ToShortDateString()}");
130 | if(_paraEntrega)
131 | relat.AppendLine(" - PARA ENTREGA");
132 | else
133 | relat.AppendLine(" - LOCAL");
134 | relat.AppendLine("=============================");
135 |
136 | for (int i = 0; i < _quantPizzas; i++) {
137 | relat.AppendLine($"{(i + 1):D2} - {_pizzas[i].NotaDeCompra()}");
138 | }
139 | relat.AppendLine($"\nTAXA: {ValorTaxa():C2}");
140 | relat.AppendLine($"\nTOTAL A PAGAR: {PrecoAPagar():C2}");
141 | relat.AppendLine("=============================");
142 | return relat.ToString();
143 | }
144 | #endregion
145 | }
146 | }
--------------------------------------------------------------------------------
/Código/01_Basicos/Hora/Hora.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 | using static System.Runtime.InteropServices.JavaScript.JSType;
7 |
8 | /**
9 | * MIT License
10 | *
11 | * Copyright(c) 2024 João Caram