using static System.Console;
using System.Collections.Generic;
public static void Main(string[] args) {
var lais = new AlunoTecnologo() {
var dao = new AlunoDao();
foreach (Aluno aluno in dao.Listar()) WriteLine($"Nome: {aluno.Nome}\tNotaB1: {aluno.NotaB1}\tNotaB2: {aluno.NotaB2}\tMedia: {aluno.Media}");
public string Nome { get; set; }
public string Ra { get; set; }
public decimal NotaB1 { get; set; }
public decimal NotaB2 { get; set; }
public virtual decimal Media => (NotaB1 + NotaB2) / 2;
public class AlunoTecnologo : Aluno {
public decimal NotaPim { get; set; }
public override decimal Media => NotaPim * 0.2m + base.Media;
private List<Aluno> alunos;
public AlunoDao() => alunos = new List<Aluno>();
public void Adicionar(Aluno aluno) => alunos.Add(aluno);
public List<Aluno> Listar() => new List<Aluno>(alunos);