Exemplo n.º 1
0
            public void Return(string name)
            {
                VHSTape tape = Movies.Find(a => a.Name == name);

                if (tape.IsRented() == true)
                {
                    tape.Rented = false;
                }
            }
Exemplo n.º 2
0
            public VHSTape GetRented(string name)
            {
                VHSTape tape = Movies.Find(a => a.Name == name);

                if (tape == null)
                {
                    return(null);
                }
                else if (tape.IsRented() == true)
                {
                    return(tape);
                }

                return(null);
            }
Exemplo n.º 3
0
            public VHSTape Rent(string name)
            {
                VHSTape tape = Movies.Find(a => a.Name == name);

                if (tape == null)
                {
                    return(null);
                }
                else if (tape.IsRented() == false)
                {
                    tape.Rented = true;
                    return(tape);
                }

                return(null);
            }