What should my code look like in Intellij IDEA (computer science)?

Hello, I'm stuck on my homework with the two problems (1.1 & 1.2). Can someone please show me what the code should look like? Thanks in advance 🙂

1 vote, average: 1.00 out of 1 (1 rating, 1 votes, rated)
You need to be a registered member to rate this.
Loading...
Subscribe
Notify of
4 Answers
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
daCypher
2 years ago

Interfaces are just templates that define which methods the classes that implement the interface must have. So you can simply write it as it's written in the task, without having to insert any code. Each of the three blocks must be in its own file.

 public interface ElectricallyDriven { public boolean standardVoltageChargeable(); public boolean highVoltageChargeable(); public void letsGo(byte additionalChargeVolume, int distance); } public enum FuelType { GASOLINE, DIESEL, LPG } public interface FuelDriven { public FuelType getFuelType(); public double getAverageConsumption(double speed); }
daCypher
2 years ago

You're welcome 👍

xxxcyberxxx
2 years ago

Hello, I'm stuck on my homework with the two tasks (1.1 & 1.2).

Well then, tell us what it depends on and what you already have?

Just follow the instructions as far as you can, even with the help of Google

Can someone please show me what the code should look like?

So you want the solutions to your homework right away? 😉 that's just not possible