SlideShare a Scribd company logo
Buy here:
http://student.land/cs-151-unit-7-assignment/
Unit 7 Assignment
Grading Information: This Program is due on Date Specified.
Comments are REQUIRED; flow charts and pseudocode are NOT REQUIRED.
Directions Points
The files must be called <LastInitialFirstInitialUnit7.java> (driver)
<LastInitialFirstInitialUnit7House.java> (handles house variables and
methods)
Proper coding conventions required the first letter of the class start with a
capital letter and the first letter of each additional word start with a capital
letter.
Only submit the .java files needed to make the program run. Do not submit
the .class file or any other file.
5%
Style Components
Include properly formatted prologue, comments, indenting, and other style
elements as shown in Chapter 2 starting page 64 and Appendix 5 page
881-892.
5%
Topics covered in chapter
Topics with * are covered in this assignment. Ensure you use every item
listed below with an * in your completed assignment.
*Relationships between reference variables and objects Reference
assignment
Memory space
Equality of Objects
Swap data in objects
*Method call chaining
*Object creating and initialization
Calling one constructor from inside another Class variable usage
Class methods
Class constants
Basic Requirements
Write a driver and house class that gets input and using method call
chaining creates 2 houses, imports the data from a text file, and outputs
the results. Refer to chapter 3 on how to read in a file.
LiFiUnit7.java
Provide a driver class that demonstrates this house class. You the code
below as the contents of you main method. Ensure you use the code
provided exactly as given
20%
inside your main method except for renaming your House class.
Scanner stdIn = new Scanner(System.in);
Scanner stdInFile = new Scanner(new
File("LiFiUnit7HouseData.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();
This demonstration driver does not call all accessor and mutator methods but it is normal
to create them regardless of an immediate use. They may be needed in the future.
Sample output is provided below. Be sure to mimic it exactly except for values entered.
LiFiUnit7House.java
Write a House class called LiFiUnit7House.java that implements the
following methods.
• setNumber – receives the house number • setStreet – receives the street
name
• setCity – receives the city name
• setState – receives the state name
• setZipCode – receives the zip code
Separate accessor methods for each instance variable utilized.
30%
Method Call Chaining 40%
Pay attention to implement method call chaining as prescribed in the main
method given. This is the main part of the program for this week.
NOTE: Complete your activity and submit it by clicking “Submit
Assignment”
Total Percentage 100%
Data for Text File (name it LiFiUnit7House.txt)
8700
NW River Park Dr.
Parkville
MO
64152
1600
Pennsylvania Ave NW
Washington
DC 20500
Sample
Your output for House 1 and House 2 should match the sample
below.
House Information
Number: 0
Street: No Street
City: No City
State: No State
Zip: No Zip Code
Importing Number.
Importing Street.
Importing City.
Importing State.
Importing ZipCode.
House Information
Number: 8700
Street: NW River Park Dr.
City: Parkville
State: MO
Zip: 64152
Importing Number.
Importing Street.
Importing City.
Importing State.
Importing ZipCode.
House Information
Number: 1600
Street: Pennsylvania Ave NW
City: Washington
State: DC
Zip: 20500

More Related Content

What's hot

Functional Programming
Functional ProgrammingFunctional Programming
Functional Programming
Bruno Lui
 
Function & Recursion
Function & RecursionFunction & Recursion
Function & Recursion
Meghaj Mallick
 
Frequently asked questions in c
Frequently asked questions in cFrequently asked questions in c
Frequently asked questions in c
David Livingston J
 
Frequently asked questions in c
Frequently asked questions in cFrequently asked questions in c
Frequently asked questions in c
David Livingston J
 
Function in c++
Function in c++Function in c++
Function in c++
Kumar
 
functions of C++
functions of C++functions of C++
functions of C++
tarandeep_kaur
 
Programming Global variable
Programming Global variableProgramming Global variable
Programming Global variable
imtiazalijoono
 
First Look at Pointers
First Look at PointersFirst Look at Pointers
First Look at Pointers
emartinez.romero
 
Viii session
Viii sessionViii session
Viii session
AliMohammad155
 
Lecture 7 Templates, Friend Classes
Lecture 7 Templates, Friend ClassesLecture 7 Templates, Friend Classes
Lecture 7 Templates, Friend Classes
bunnykhan
 
IT104 Week 4 - Module/Function
IT104 Week 4 - Module/FunctionIT104 Week 4 - Module/Function
IT104 Week 4 - Module/Function
Cornerstone University
 
Parameter passing to_functions_in_c
Parameter passing to_functions_in_cParameter passing to_functions_in_c
Parameter passing to_functions_in_c
ForwardBlog Enewzletter
 
Function
FunctionFunction
Function
Saniati
 
Function Parameters
Function ParametersFunction Parameters
Function Parameters
primeteacher32
 
C programming language working with functions 1
C programming language working with functions 1C programming language working with functions 1
C programming language working with functions 1
Jeevan Raj
 

What's hot (15)

Functional Programming
Functional ProgrammingFunctional Programming
Functional Programming
 
Function & Recursion
Function & RecursionFunction & Recursion
Function & Recursion
 
Frequently asked questions in c
Frequently asked questions in cFrequently asked questions in c
Frequently asked questions in c
 
Frequently asked questions in c
Frequently asked questions in cFrequently asked questions in c
Frequently asked questions in c
 
Function in c++
Function in c++Function in c++
Function in c++
 
functions of C++
functions of C++functions of C++
functions of C++
 
Programming Global variable
Programming Global variableProgramming Global variable
Programming Global variable
 
First Look at Pointers
First Look at PointersFirst Look at Pointers
First Look at Pointers
 
Viii session
Viii sessionViii session
Viii session
 
Lecture 7 Templates, Friend Classes
Lecture 7 Templates, Friend ClassesLecture 7 Templates, Friend Classes
Lecture 7 Templates, Friend Classes
 
IT104 Week 4 - Module/Function
IT104 Week 4 - Module/FunctionIT104 Week 4 - Module/Function
IT104 Week 4 - Module/Function
 
Parameter passing to_functions_in_c
Parameter passing to_functions_in_cParameter passing to_functions_in_c
Parameter passing to_functions_in_c
 
Function
FunctionFunction
Function
 
Function Parameters
Function ParametersFunction Parameters
Function Parameters
 
C programming language working with functions 1
C programming language working with functions 1C programming language working with functions 1
C programming language working with functions 1
 

Similar to CS 151 Unit 7 Assignment

CGI.ppt
CGI.pptCGI.ppt
Chap2java5th
Chap2java5thChap2java5th
Chap2java5th
Asfand Hassan
 
Functions
FunctionsFunctions
Functions
PralhadKhanal1
 
please code in c#- please note that im a complete beginner- northwind.docx
please code in c#- please note that im a complete beginner-  northwind.docxplease code in c#- please note that im a complete beginner-  northwind.docx
please code in c#- please note that im a complete beginner- northwind.docx
AustinaGRPaigey
 
Cis 170 c ilab 5 of 7 arrays and strings
Cis 170 c ilab 5 of 7 arrays and stringsCis 170 c ilab 5 of 7 arrays and strings
Cis 170 c ilab 5 of 7 arrays and strings
CIS321
 
Ch06
Ch06Ch06
Devry cis-170-c-i lab-5-of-7-arrays-and-strings
Devry cis-170-c-i lab-5-of-7-arrays-and-stringsDevry cis-170-c-i lab-5-of-7-arrays-and-strings
Devry cis-170-c-i lab-5-of-7-arrays-and-strings
noahjamessss
 
Devry cis-170-c-i lab-5-of-7-arrays-and-strings
Devry cis-170-c-i lab-5-of-7-arrays-and-stringsDevry cis-170-c-i lab-5-of-7-arrays-and-strings
Devry cis-170-c-i lab-5-of-7-arrays-and-strings
cskvsmi44
 
Devry cis 170 c i lab 5 of 7 arrays and strings
Devry cis 170 c i lab 5 of 7 arrays and stringsDevry cis 170 c i lab 5 of 7 arrays and strings
Devry cis 170 c i lab 5 of 7 arrays and strings
jody zoll
 
Os lab final
Os lab finalOs lab final
Os lab final
LakshmiSarvani6
 
Hey I need help creating this code using Visual Studio (Basic) 2015.pdf
Hey I need help creating this code using Visual Studio (Basic) 2015.pdfHey I need help creating this code using Visual Studio (Basic) 2015.pdf
Hey I need help creating this code using Visual Studio (Basic) 2015.pdf
forwardcom41
 
Char word counter in Python with simple gui - PROJECT
Char word counter in Python with simple gui - PROJECTChar word counter in Python with simple gui - PROJECT
Char word counter in Python with simple gui - PROJECT
MahmutKAMALAK
 
Capstone ms2
Capstone ms2Capstone ms2
Capstone ms2
TanishGupta44
 
Fundamental of programming Fundamental of programming
Fundamental of programming Fundamental of programmingFundamental of programming Fundamental of programming
Fundamental of programming Fundamental of programming
LidetAdmassu
 
Week 2 iLab TCO 2 — Given a simple problem, design a solutio.docx
Week 2 iLab TCO 2 — Given a simple problem, design a solutio.docxWeek 2 iLab TCO 2 — Given a simple problem, design a solutio.docx
Week 2 iLab TCO 2 — Given a simple problem, design a solutio.docx
melbruce90096
 
City GUIWrite a Java GUI program which reads data about US cities..pdf
City GUIWrite a Java GUI program which reads data about US cities..pdfCity GUIWrite a Java GUI program which reads data about US cities..pdf
City GUIWrite a Java GUI program which reads data about US cities..pdf
rushabhshah600
 
.NET Code Examples
.NET Code Examples.NET Code Examples
.NET Code Examples
GaryB47
 
Unit-2 Getting Input from User.pptx
Unit-2 Getting Input from User.pptxUnit-2 Getting Input from User.pptx
Unit-2 Getting Input from User.pptx
Lovely Professional University
 
Getting Input from User
Getting Input from UserGetting Input from User
Getting Input from User
Lovely Professional University
 
Implement a Javascript application that allows the user to enter strin.docx
Implement a Javascript application that allows the user to enter strin.docxImplement a Javascript application that allows the user to enter strin.docx
Implement a Javascript application that allows the user to enter strin.docx
mckerliejonelle
 

Similar to CS 151 Unit 7 Assignment (20)

CGI.ppt
CGI.pptCGI.ppt
CGI.ppt
 
Chap2java5th
Chap2java5thChap2java5th
Chap2java5th
 
Functions
FunctionsFunctions
Functions
 
please code in c#- please note that im a complete beginner- northwind.docx
please code in c#- please note that im a complete beginner-  northwind.docxplease code in c#- please note that im a complete beginner-  northwind.docx
please code in c#- please note that im a complete beginner- northwind.docx
 
Cis 170 c ilab 5 of 7 arrays and strings
Cis 170 c ilab 5 of 7 arrays and stringsCis 170 c ilab 5 of 7 arrays and strings
Cis 170 c ilab 5 of 7 arrays and strings
 
Ch06
Ch06Ch06
Ch06
 
Devry cis-170-c-i lab-5-of-7-arrays-and-strings
Devry cis-170-c-i lab-5-of-7-arrays-and-stringsDevry cis-170-c-i lab-5-of-7-arrays-and-strings
Devry cis-170-c-i lab-5-of-7-arrays-and-strings
 
Devry cis-170-c-i lab-5-of-7-arrays-and-strings
Devry cis-170-c-i lab-5-of-7-arrays-and-stringsDevry cis-170-c-i lab-5-of-7-arrays-and-strings
Devry cis-170-c-i lab-5-of-7-arrays-and-strings
 
Devry cis 170 c i lab 5 of 7 arrays and strings
Devry cis 170 c i lab 5 of 7 arrays and stringsDevry cis 170 c i lab 5 of 7 arrays and strings
Devry cis 170 c i lab 5 of 7 arrays and strings
 
Os lab final
Os lab finalOs lab final
Os lab final
 
Hey I need help creating this code using Visual Studio (Basic) 2015.pdf
Hey I need help creating this code using Visual Studio (Basic) 2015.pdfHey I need help creating this code using Visual Studio (Basic) 2015.pdf
Hey I need help creating this code using Visual Studio (Basic) 2015.pdf
 
Char word counter in Python with simple gui - PROJECT
Char word counter in Python with simple gui - PROJECTChar word counter in Python with simple gui - PROJECT
Char word counter in Python with simple gui - PROJECT
 
Capstone ms2
Capstone ms2Capstone ms2
Capstone ms2
 
Fundamental of programming Fundamental of programming
Fundamental of programming Fundamental of programmingFundamental of programming Fundamental of programming
Fundamental of programming Fundamental of programming
 
Week 2 iLab TCO 2 — Given a simple problem, design a solutio.docx
Week 2 iLab TCO 2 — Given a simple problem, design a solutio.docxWeek 2 iLab TCO 2 — Given a simple problem, design a solutio.docx
Week 2 iLab TCO 2 — Given a simple problem, design a solutio.docx
 
City GUIWrite a Java GUI program which reads data about US cities..pdf
City GUIWrite a Java GUI program which reads data about US cities..pdfCity GUIWrite a Java GUI program which reads data about US cities..pdf
City GUIWrite a Java GUI program which reads data about US cities..pdf
 
.NET Code Examples
.NET Code Examples.NET Code Examples
.NET Code Examples
 
Unit-2 Getting Input from User.pptx
Unit-2 Getting Input from User.pptxUnit-2 Getting Input from User.pptx
Unit-2 Getting Input from User.pptx
 
Getting Input from User
Getting Input from UserGetting Input from User
Getting Input from User
 
Implement a Javascript application that allows the user to enter strin.docx
Implement a Javascript application that allows the user to enter strin.docxImplement a Javascript application that allows the user to enter strin.docx
Implement a Javascript application that allows the user to enter strin.docx
 

Recently uploaded

The Steadfast and Reliable Bull: Taurus Zodiac Sign
The Steadfast and Reliable Bull: Taurus Zodiac SignThe Steadfast and Reliable Bull: Taurus Zodiac Sign
The Steadfast and Reliable Bull: Taurus Zodiac Sign
my Pandit
 
IMG_20240615_091110.pdf dpboss guessing
IMG_20240615_091110.pdf dpboss  guessingIMG_20240615_091110.pdf dpboss  guessing
Satta Matka Dpboss Kalyan Matka Results Kalyan Chart
Satta Matka Dpboss Kalyan Matka Results Kalyan ChartSatta Matka Dpboss Kalyan Matka Results Kalyan Chart
Satta Matka Dpboss Kalyan Matka Results Kalyan Chart
Satta Matka Dpboss Kalyan Matka Results
 
一比一原版(QMUE毕业证书)英国爱丁堡玛格丽特女王大学毕业证文凭如何办理
一比一原版(QMUE毕业证书)英国爱丁堡玛格丽特女王大学毕业证文凭如何办理一比一原版(QMUE毕业证书)英国爱丁堡玛格丽特女王大学毕业证文凭如何办理
一比一原版(QMUE毕业证书)英国爱丁堡玛格丽特女王大学毕业证文凭如何办理
taqyea
 
Satta Matka Dpboss Kalyan Matka Results Kalyan Chart
Satta Matka Dpboss Kalyan Matka Results Kalyan ChartSatta Matka Dpboss Kalyan Matka Results Kalyan Chart
Satta Matka Dpboss Kalyan Matka Results Kalyan Chart
Satta Matka Dpboss Kalyan Matka Results
 
NIMA2024 | De toegevoegde waarde van DEI en ESG in campagnes | Nathalie Lam |...
NIMA2024 | De toegevoegde waarde van DEI en ESG in campagnes | Nathalie Lam |...NIMA2024 | De toegevoegde waarde van DEI en ESG in campagnes | Nathalie Lam |...
NIMA2024 | De toegevoegde waarde van DEI en ESG in campagnes | Nathalie Lam |...
BBPMedia1
 
State of D2C in India: A Logistics Update
State of D2C in India: A Logistics UpdateState of D2C in India: A Logistics Update
State of D2C in India: A Logistics Update
RedSeer
 
Dpboss Matka Guessing Satta Matta Matka Kalyan Chart Indian Matka
Dpboss Matka Guessing Satta Matta Matka Kalyan Chart Indian MatkaDpboss Matka Guessing Satta Matta Matka Kalyan Chart Indian Matka
Dpboss Matka Guessing Satta Matta Matka Kalyan Chart Indian Matka
➒➌➎➏➑➐➋➑➐➐Dpboss Matka Guessing Satta Matka Kalyan Chart Indian Matka
 
Satta Matka Dpboss Kalyan Matka Results Kalyan Chart
Satta Matka Dpboss Kalyan Matka Results Kalyan ChartSatta Matka Dpboss Kalyan Matka Results Kalyan Chart
Satta Matka Dpboss Kalyan Matka Results Kalyan Chart
Satta Matka Dpboss Kalyan Matka Results
 
1Q24_HYUNDAI CAPITAL SERVICES INC. AND SUBSIDIARIES
1Q24_HYUNDAI CAPITAL SERVICES INC. AND SUBSIDIARIES1Q24_HYUNDAI CAPITAL SERVICES INC. AND SUBSIDIARIES
1Q24_HYUNDAI CAPITAL SERVICES INC. AND SUBSIDIARIES
irhcs
 
Best Competitive Marble Pricing in Dubai - ☎ 9928909666
Best Competitive Marble Pricing in Dubai - ☎ 9928909666Best Competitive Marble Pricing in Dubai - ☎ 9928909666
Best Competitive Marble Pricing in Dubai - ☎ 9928909666
Stone Art Hub
 
Science Around Us Module 2 Matter Around Us
Science Around Us Module 2 Matter Around UsScience Around Us Module 2 Matter Around Us
Science Around Us Module 2 Matter Around Us
PennapaKeavsiri
 
Unlocking WhatsApp Marketing with HubSpot: Integrating Messaging into Your Ma...
Unlocking WhatsApp Marketing with HubSpot: Integrating Messaging into Your Ma...Unlocking WhatsApp Marketing with HubSpot: Integrating Messaging into Your Ma...
Unlocking WhatsApp Marketing with HubSpot: Integrating Messaging into Your Ma...
Niswey
 
The Role of White Label Bookkeeping Services in Supporting the Growth and Sca...
The Role of White Label Bookkeeping Services in Supporting the Growth and Sca...The Role of White Label Bookkeeping Services in Supporting the Growth and Sca...
The Role of White Label Bookkeeping Services in Supporting the Growth and Sca...
YourLegal Accounting
 
Satta Matka Dpboss Kalyan Matka Results Kalyan Chart
Satta Matka Dpboss Kalyan Matka Results Kalyan ChartSatta Matka Dpboss Kalyan Matka Results Kalyan Chart
Satta Matka Dpboss Kalyan Matka Results Kalyan Chart
Satta Matka Dpboss Kalyan Matka Results
 
Ellen Burstyn: From Detroit Dreamer to Hollywood Legend | CIO Women Magazine
Ellen Burstyn: From Detroit Dreamer to Hollywood Legend | CIO Women MagazineEllen Burstyn: From Detroit Dreamer to Hollywood Legend | CIO Women Magazine
Ellen Burstyn: From Detroit Dreamer to Hollywood Legend | CIO Women Magazine
CIOWomenMagazine
 
Kirill Klip GEM Royalty TNR Gold Copper Presentation
Kirill Klip GEM Royalty TNR Gold Copper PresentationKirill Klip GEM Royalty TNR Gold Copper Presentation
Kirill Klip GEM Royalty TNR Gold Copper Presentation
Kirill Klip
 
CULR Spring 2024 Journal.pdf testing for duke
CULR Spring 2024 Journal.pdf testing for dukeCULR Spring 2024 Journal.pdf testing for duke
CULR Spring 2024 Journal.pdf testing for duke
ZevinAttisha
 
Satta Matka Dpboss Kalyan Matka Results Kalyan Chart
Satta Matka Dpboss Kalyan Matka Results Kalyan ChartSatta Matka Dpboss Kalyan Matka Results Kalyan Chart
Satta Matka Dpboss Kalyan Matka Results Kalyan Chart
Satta Matka Dpboss Kalyan Matka Results
 
Efficient PHP Development Solutions for Dynamic Web Applications
Efficient PHP Development Solutions for Dynamic Web ApplicationsEfficient PHP Development Solutions for Dynamic Web Applications
Efficient PHP Development Solutions for Dynamic Web Applications
Harwinder Singh
 

Recently uploaded (20)

The Steadfast and Reliable Bull: Taurus Zodiac Sign
The Steadfast and Reliable Bull: Taurus Zodiac SignThe Steadfast and Reliable Bull: Taurus Zodiac Sign
The Steadfast and Reliable Bull: Taurus Zodiac Sign
 
IMG_20240615_091110.pdf dpboss guessing
IMG_20240615_091110.pdf dpboss  guessingIMG_20240615_091110.pdf dpboss  guessing
IMG_20240615_091110.pdf dpboss guessing
 
Satta Matka Dpboss Kalyan Matka Results Kalyan Chart
Satta Matka Dpboss Kalyan Matka Results Kalyan ChartSatta Matka Dpboss Kalyan Matka Results Kalyan Chart
Satta Matka Dpboss Kalyan Matka Results Kalyan Chart
 
一比一原版(QMUE毕业证书)英国爱丁堡玛格丽特女王大学毕业证文凭如何办理
一比一原版(QMUE毕业证书)英国爱丁堡玛格丽特女王大学毕业证文凭如何办理一比一原版(QMUE毕业证书)英国爱丁堡玛格丽特女王大学毕业证文凭如何办理
一比一原版(QMUE毕业证书)英国爱丁堡玛格丽特女王大学毕业证文凭如何办理
 
Satta Matka Dpboss Kalyan Matka Results Kalyan Chart
Satta Matka Dpboss Kalyan Matka Results Kalyan ChartSatta Matka Dpboss Kalyan Matka Results Kalyan Chart
Satta Matka Dpboss Kalyan Matka Results Kalyan Chart
 
NIMA2024 | De toegevoegde waarde van DEI en ESG in campagnes | Nathalie Lam |...
NIMA2024 | De toegevoegde waarde van DEI en ESG in campagnes | Nathalie Lam |...NIMA2024 | De toegevoegde waarde van DEI en ESG in campagnes | Nathalie Lam |...
NIMA2024 | De toegevoegde waarde van DEI en ESG in campagnes | Nathalie Lam |...
 
State of D2C in India: A Logistics Update
State of D2C in India: A Logistics UpdateState of D2C in India: A Logistics Update
State of D2C in India: A Logistics Update
 
Dpboss Matka Guessing Satta Matta Matka Kalyan Chart Indian Matka
Dpboss Matka Guessing Satta Matta Matka Kalyan Chart Indian MatkaDpboss Matka Guessing Satta Matta Matka Kalyan Chart Indian Matka
Dpboss Matka Guessing Satta Matta Matka Kalyan Chart Indian Matka
 
Satta Matka Dpboss Kalyan Matka Results Kalyan Chart
Satta Matka Dpboss Kalyan Matka Results Kalyan ChartSatta Matka Dpboss Kalyan Matka Results Kalyan Chart
Satta Matka Dpboss Kalyan Matka Results Kalyan Chart
 
1Q24_HYUNDAI CAPITAL SERVICES INC. AND SUBSIDIARIES
1Q24_HYUNDAI CAPITAL SERVICES INC. AND SUBSIDIARIES1Q24_HYUNDAI CAPITAL SERVICES INC. AND SUBSIDIARIES
1Q24_HYUNDAI CAPITAL SERVICES INC. AND SUBSIDIARIES
 
Best Competitive Marble Pricing in Dubai - ☎ 9928909666
Best Competitive Marble Pricing in Dubai - ☎ 9928909666Best Competitive Marble Pricing in Dubai - ☎ 9928909666
Best Competitive Marble Pricing in Dubai - ☎ 9928909666
 
Science Around Us Module 2 Matter Around Us
Science Around Us Module 2 Matter Around UsScience Around Us Module 2 Matter Around Us
Science Around Us Module 2 Matter Around Us
 
Unlocking WhatsApp Marketing with HubSpot: Integrating Messaging into Your Ma...
Unlocking WhatsApp Marketing with HubSpot: Integrating Messaging into Your Ma...Unlocking WhatsApp Marketing with HubSpot: Integrating Messaging into Your Ma...
Unlocking WhatsApp Marketing with HubSpot: Integrating Messaging into Your Ma...
 
The Role of White Label Bookkeeping Services in Supporting the Growth and Sca...
The Role of White Label Bookkeeping Services in Supporting the Growth and Sca...The Role of White Label Bookkeeping Services in Supporting the Growth and Sca...
The Role of White Label Bookkeeping Services in Supporting the Growth and Sca...
 
Satta Matka Dpboss Kalyan Matka Results Kalyan Chart
Satta Matka Dpboss Kalyan Matka Results Kalyan ChartSatta Matka Dpboss Kalyan Matka Results Kalyan Chart
Satta Matka Dpboss Kalyan Matka Results Kalyan Chart
 
Ellen Burstyn: From Detroit Dreamer to Hollywood Legend | CIO Women Magazine
Ellen Burstyn: From Detroit Dreamer to Hollywood Legend | CIO Women MagazineEllen Burstyn: From Detroit Dreamer to Hollywood Legend | CIO Women Magazine
Ellen Burstyn: From Detroit Dreamer to Hollywood Legend | CIO Women Magazine
 
Kirill Klip GEM Royalty TNR Gold Copper Presentation
Kirill Klip GEM Royalty TNR Gold Copper PresentationKirill Klip GEM Royalty TNR Gold Copper Presentation
Kirill Klip GEM Royalty TNR Gold Copper Presentation
 
CULR Spring 2024 Journal.pdf testing for duke
CULR Spring 2024 Journal.pdf testing for dukeCULR Spring 2024 Journal.pdf testing for duke
CULR Spring 2024 Journal.pdf testing for duke
 
Satta Matka Dpboss Kalyan Matka Results Kalyan Chart
Satta Matka Dpboss Kalyan Matka Results Kalyan ChartSatta Matka Dpboss Kalyan Matka Results Kalyan Chart
Satta Matka Dpboss Kalyan Matka Results Kalyan Chart
 
Efficient PHP Development Solutions for Dynamic Web Applications
Efficient PHP Development Solutions for Dynamic Web ApplicationsEfficient PHP Development Solutions for Dynamic Web Applications
Efficient PHP Development Solutions for Dynamic Web Applications
 

CS 151 Unit 7 Assignment

  • 1. Buy here: http://student.land/cs-151-unit-7-assignment/ Unit 7 Assignment Grading Information: This Program is due on Date Specified. Comments are REQUIRED; flow charts and pseudocode are NOT REQUIRED. Directions Points The files must be called <LastInitialFirstInitialUnit7.java> (driver) <LastInitialFirstInitialUnit7House.java> (handles house variables and methods) Proper coding conventions required the first letter of the class start with a capital letter and the first letter of each additional word start with a capital letter. Only submit the .java files needed to make the program run. Do not submit the .class file or any other file. 5%
  • 2. Style Components Include properly formatted prologue, comments, indenting, and other style elements as shown in Chapter 2 starting page 64 and Appendix 5 page 881-892. 5% Topics covered in chapter Topics with * are covered in this assignment. Ensure you use every item listed below with an * in your completed assignment. *Relationships between reference variables and objects Reference assignment Memory space Equality of Objects Swap data in objects *Method call chaining *Object creating and initialization
  • 3. Calling one constructor from inside another Class variable usage Class methods Class constants Basic Requirements Write a driver and house class that gets input and using method call chaining creates 2 houses, imports the data from a text file, and outputs the results. Refer to chapter 3 on how to read in a file. LiFiUnit7.java Provide a driver class that demonstrates this house class. You the code below as the contents of you main method. Ensure you use the code provided exactly as given 20% inside your main method except for renaming your House class. Scanner stdIn = new Scanner(System.in); Scanner stdInFile = new Scanner(new File("LiFiUnit7HouseData.txt")); LiFiUnit7House_SU_2016 house1, house2; //New houses //Create house 1 using default constructor house1 = new LiFiUnit7House_SU_2016();
  • 4. 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();
  • 5. This demonstration driver does not call all accessor and mutator methods but it is normal to create them regardless of an immediate use. They may be needed in the future. Sample output is provided below. Be sure to mimic it exactly except for values entered. LiFiUnit7House.java Write a House class called LiFiUnit7House.java that implements the following methods. • setNumber – receives the house number • setStreet – receives the street name • setCity – receives the city name • setState – receives the state name • setZipCode – receives the zip code Separate accessor methods for each instance variable utilized. 30% Method Call Chaining 40%
  • 6. Pay attention to implement method call chaining as prescribed in the main method given. This is the main part of the program for this week. NOTE: Complete your activity and submit it by clicking “Submit Assignment” Total Percentage 100% Data for Text File (name it LiFiUnit7House.txt) 8700 NW River Park Dr. Parkville MO 64152 1600 Pennsylvania Ave NW Washington DC 20500 Sample Your output for House 1 and House 2 should match the sample below. House Information Number: 0 Street: No Street City: No City
  • 7. State: No State Zip: No Zip Code Importing Number. Importing Street. Importing City. Importing State. Importing ZipCode. House Information Number: 8700 Street: NW River Park Dr. City: Parkville State: MO Zip: 64152 Importing Number. Importing Street. Importing City. Importing State. Importing ZipCode. House Information Number: 1600 Street: Pennsylvania Ave NW City: Washington State: DC Zip: 20500