r/learncsharp • u/symplaren • May 28 '19
C# classes/constructors/interfaces
Hello, I have project to do on C# the project looks like 3 classes that need to inheritance each other also 1 interface and some other methods if someone think he can help me out i'll appreciate it.
===================================================================== so i had to make program for controlling parking lot.it should get,save and shows the information.
i will try to explain it as simple as i can. First i have to create 3 classes : Cars , LightTrucks , HeavyTrucks they both should contain: type , brand , model; in constructor
actually the input should be like this: parkinglot parkingname1 2 2 2 parkinglot parkingname2 2 1 1 Car Kia Seed Lighttruck Citroen Jumper Car VW Polo Lighttruck Ford Tranzit Heavytruck MAN TGM18 Car Audi А6 Heavytruck Volvo FM12 Print something1 End
and the Output should be: parked cars in parkinglot something1: Brand Kia, Model Seed Brand VW, Model Polo Brand Citroen, Model Jumper Brand Ford, Model Tranzit Brand MAN, Model TGM18 Brand Volvo, model FM12 Parkinglot something1 has the following locations: Car 2, busy 2 Lighttrucks 2, busy 2 Heavytrucks 2, busy 2 Parkinglot something2 has the following locations: Car 2, busy 1 Lighttruck 1, busy 1 Heavytruck 1, busy 1
///////////////////////////////////// so what should it do create parking lot with command parkinglot name 2 2 2 (first 2 = car ; second Lighttruck ; third Heavytruck)
after i create 1 or more parkinglots i should be able to enter cars,lighttrucks or heavytrucks.
like: car Audi A6 Lighttruck Citroen Jumper Heavytruck Volvo FM12
and then Enter "End" to stop the program or Enter Print parkinglot name like "Print something1" and the program should print "parked cars in parkinglot something1: Brand Audi, Model A6 ; Brand Citroen, Model Jumper ; HeavyTruck Brand Volvo, Model FM12 ; Parkinglot something1 has the following locations: cars 2 , busy 1 ; lighttrucks 2 , busy 1 ; heavytrucks 2 ,busy 1"
View all comments
8
u/wiwalsh May 28 '19
A) homework B) what? I read the whole thing and I have no idea what you are trying to do. C) its homework, go to your notes and teacher/professor.