Welcome to the CSC Q&A, on our server named in honor of Ada Lovelace. Write great code! Get help and give help!
It is our choices... that show what we truly are, far more than our abilities.


+7 votes

How did you guys implement you car classes into your main classes and what kind of methods do you have for them?

asked in CSC305 Fall 2020 by (1 point)

2 Answers

+4 votes

We have classes for both the enemy car and player car. Then in the main class you can create instances of them and have them interact. We have move methods and an intersect method to test if the cars are intersecting

answered by (1 point)
+4 votes

We have classes for enemy and player cars that are inheriting methods from an abstract class that creates them all. We have methods that move the enemy cars and see if any of the enemy cars and player cars interact.

answered by (1 point)