Question

I need some help please. I have built my program but I am seeing some codes...

I need some help please. I have built my program but I am seeing some codes being thrown that I can't figure out how to solve. If I can get some help looking over the code and how to fix it, I'd greatly appreciate.

Bicycle.java:[48,4] method does not override or implement a method from a supertype

TestFootPrint.java:[23,30] incompatible types: Building cannot be converted to CarbonFootprint
TestFootPrint.java:[24,30] incompatible types: Car cannot be converted to CarbonFootprint
TestFootPrint.java:[25,30] incompatible types: Bicycle cannot be converted to CarbonFootprint
Building.java:[57,4] method does not override or implement a method from a supertype
Car.java:[65,4] method does not override or implement a method from a supertype
6 errors

Not sure why this isn't working. any help would be greatly appreciated - will post full code if need be.

0 0
Add a comment Improve this question Transcribed image text
Answer #1

TestFootPrint.java:[23,30] incompatible types: Building cannot be converted to CarbonFootprint
TestFootPrint.java:[24,30] incompatible types: Car cannot be converted to CarbonFootprint
TestFootPrint.java:[25,30] incompatible types: Bicycle cannot be converted to CarbonFootprint

The above three errors are coming because you are trying to autocast one class to another, like Building to CarbonFootprint. Since you have not provided the code, it is difficult to comment further why this error is coming specifically.

Building.java:[57,4] method does not override or implement a method from a supertype
Car.java:[65,4] method does not override or implement a method from a supertype

These errors are coming because Building and Car classes are probably extending some other class which has some abstract methods. And, these abstract methods are not implemented in the child classes Building and Car.

Add a comment
Know the answer?
Add Answer to:
I need some help please. I have built my program but I am seeing some codes...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • I need help with building the program since Huffman's algorithm is not clear. I would appreciate...

    I need help with building the program since Huffman's algorithm is not clear. I would appreciate if a pseudo code for encoding and decoding the algorithm is provided, as well as the program for both of them since it deals with English text instead of characters. I'd appreciate it if it was in C++, or Java. 1. si o Write a program that constructs a Huffman code for a given English text and encode it. The English character occurrence probabilities...

  • I need some help on these two proofs... I know for the first question I am...

    I need some help on these two proofs... I know for the first question I am meant to prove it using the definition of a left/right limit. The second proof I am not too certain. Any help is much appreciated. Thank you! 1. Let f be a function defined on an interval I. Let a be an interior point of I Show that f is continuous at a if and only if both left limit and right limit of f...

  • I am writing an admission essay for nursing school and need some help. How long should...

    I am writing an admission essay for nursing school and need some help. How long should my essay be? Should I just start in on the essay or do I need to do APA format and all that? Any tips and help would be greatly appreciated. Please submit answers to the following 4 questions to be considered with your application. 1. What is your understanding of the role of the professional nurse and why have you chosen to pursue nursing...

  • Hi I need some help with this I just need the code and the collection name...

    Hi I need some help with this I just need the code and the collection name is research only the code I dont need any screenshots of the output. it should be for companies.json using the research collection as like this db.research.aggregate({}) but I don't know how to do the rest. This is the database but it is hard to paste it all so I will paste some and it should be create. Please I need this to be done...

  • Would someone help please, with code to finish. Iterator and entrySet, I need help. please ```...

    Would someone help please, with code to finish. Iterator and entrySet, I need help. please ``` package coll.MapSet; import java.util.*; public class MapSet extends AbstractMap> implements Iterable { private Map> mapset = new HashMap<>(); /* Implement addValue such that calling this method adds the given value to the HashSet associated with the given key. This method must have the following signature: addValue(K key, V value) */ public void addValue(K key, V value) { // If the set has the key,...

  • I really need some help fixing a code error in Visual Basic I was wondering if...

    I really need some help fixing a code error in Visual Basic I was wondering if anyone could help fix the error that I'm about to provide in bold thanks so much! I'll also tell what the error is. Public Class MainForm Private Sub exitButton_Click(sender As Object, e As EventArgs) Handles exitButton.Click Me.Close() End Sub Dim img As Image = Image.FromFile("C:\Users\Pranesh\Pictures\11599264.jpg") house1PictureBox.Image = img house2PictureBox.Image = img house3PictureBox.Image = img house4PictureBox.Image = img house1PictureBox.Visible = False house2PictureBox.Visible = False house3PictureBox.Visible...

  • I really need some help! if you please explain I would greatly appreciate it! The ideal...

    I really need some help! if you please explain I would greatly appreciate it! The ideal Gas Lawa Madison Spitler - General Chemistry Lab - Fall19 > Activities and Due Dates > es Post-Lab Assignment Score: 0/500 Resources Give Up Hint Check Answer < Question 5 of 5 > 3.15 g of an unknown gas at 77 °C and 1.00 bar is stored in a 2.35 L flask. What is the density of the gas? density: YL What is the...

  • I need help with my code. It keeps getting this error: The assignment is: Create a...

    I need help with my code. It keeps getting this error: The assignment is: Create a class to represent a Food object. Use the description provided below in UML. Food name : String calories : int Food(String, int) // The only constructor. Food name and calories must be // specified setName(String) : void // Sets the name of the Food getName() : String // Returns the name of the Food setCalories(int) : void // Sets the calories of the Food...

  • I have a queue and stack class program that deals with a palindrome, I need someone...

    I have a queue and stack class program that deals with a palindrome, I need someone to help to put in templates then rerun the code. I'd greatly appreciate it. It's in C++. Here is my program: #include<iostream> #include<list> #include<iterator> #include<string> using namespace std; class Queue { public: list <char> queue; Queue() { list <char> queue; } void Push(char item) { queue.push_back(item); } char pop() { char first = queue.front(); queue.pop_front(); return first; } bool is_empty() { if(queue.empty()) { return...

  • I really need some help with this please I would greatly appreciate it! ACLIVILIS anu Due...

    I really need some help with this please I would greatly appreciate it! ACLIVILIS anu Due Dates -- General Chemistry Lab - Falliy ty and Hess' Law Pre-Lab Assignment Score: 95/500 Resources Give Up? Hint Check Answer Question 5 of 5 > In a constant-pressure calorimeter, 60.0 mL of 0.320 M Ba(OH), was added to 60.0 mL of 0.640 M HCI. The reaction caused the temperature of the solution to rise from 21.23 °C to 25.59 °C. If the solution...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT