SophiaPretty

(5)

$14/per page/Negotiable

About SophiaPretty

Levels Tought:
Elementary,Middle School,High School,College,University,PHD

Expertise:
Accounting,Algebra See all
Accounting,Algebra,Applied Sciences,Architecture and Design,Art & Design,Biology,Business & Finance,Calculus,Chemistry,Communications,Computer Science,Economics,Engineering,English,Environmental science,Essay writing Hide all
Teaching Since: Jul 2017
Last Sign in: 213 Weeks Ago, 5 Days Ago
Questions Answered: 15833
Tutorials Posted: 15827

Education

  • MBA,PHD, Juris Doctor
    Strayer,Devery,Harvard University
    Mar-1995 - Mar-2002

Experience

  • Manager Planning
    WalMart
    Mar-2001 - Feb-2009

Category > Engineering Posted 11 Oct 2017 My Price 10.00

Exception in thread "main" java.lang.Error: Unresolved compilation problem:

Please I need this code fixed it's due in a few hours and I don't know what's wrong I get the following errors

 

Exception in thread "main" java.lang.Error: Unresolved compilation problem: 

The method setStreet(String) is undefined for the type Object

 

at HMUnit7.main(HMUnit7.java:31)

---------------------------------------------------------------------------------------

 

import java.io.File;

import java.io.FileNotFoundException;

import java.util.Scanner;

 

public class HMUnit7 {

 

public static void main(String[] args) throws FileNotFoundException {

Scanner stdIn = new Scanner(System.in);

Scanner stdInFile = new Scanner(new File("LiFiUnit7House.txt)"));

LiFiUnit7House_SU_2016 house1, house2; //New houses

//Create house 1 using default constructor

house1 = new LiFiUnit7House_SU_2016();

house1.print(); //print house 1 with default values

String street, city, state, zipCode;

int number;

System.out.println("Importing Number.");

number = stdInFile.nextInt();

stdInFile.nextLine();

System.out.println("Importing Street.");

street = stdInFile.nextLine();

System.out.println("Importing City.");

city = stdInFile.nextLine();

System.out.println("Importing State.");

state = stdInFile.nextLine();

System.out.println("Importing ZipCode.");

zipCode = stdInFile.nextLine();

System.out.println();

//use method call chaining to set values

//and print results for house 1

house1.setNumber(number).setStreet(street)

.setCity(city).setState(state)

.setZipCode(zipCode).print();

System.out.println("Importing Number.");

number = stdInFile.nextInt();

stdInFile.nextLine();

System.out.println("Importing Street.");

street = stdInFile.nextLine();

System.out.println("Importing City.");

city = stdInFile.nextLine();

System.out.println("Importing State.");

state = stdInFile.nextLine();

System.out.println("Importing ZipCode.");

zipCode = stdInFile.nextLine();

System.out.println();

//create house 2 using 5 parameter constructor

house2 = new LiFiUnit7House_SU_2016(number,

street, city, state, zipCode);

//print house 2

house2.print();

 

}

 

}

Attachments:

Answers

(5)
Status NEW Posted 11 Oct 2017 11:10 AM My Price 10.00

-----------  ----------- H-----------ell-----------o S-----------ir/-----------Mad-----------am ----------- Th-----------ank----------- yo-----------u f-----------or -----------you-----------r i-----------nte-----------res-----------t a-----------nd -----------buy-----------ing----------- my----------- po-----------ste-----------d s-----------olu-----------tio-----------n. -----------Ple-----------ase----------- pi-----------ng -----------me -----------on -----------cha-----------t I----------- am----------- on-----------lin-----------e o-----------r i-----------nbo-----------x m-----------e a----------- me-----------ssa-----------ge -----------I w-----------ill----------- be----------- qu-----------ick-----------ly

Not Rated(0)