Question
A java program test Developing a Test Plan For this assignment, develop a test plan for Assignment 1 and (at least) six JUnit tests for
A java program test
Developing a Test Plan For this assignment, develop a test plan for Assignment 1 and (at least) six JUnit tests for Assignment 1s House class.
package assignment;
public class House { private String ownerName; private String phoneNumber; private String streetAddress; private String city; private String state; private String zipCode; private Room rooms[]; private int roomIndex;
public House(int numRooms){ rooms = new Room[numRooms]; this.ownerName = ""; this.phoneNumber = ""; this.streetAddress = ""; this.city = ""; this.state = ""; this.zipCode = ""; this.roomIndex = 0; } public String getOwnerName() { return ownerName; } public void setOwnerName(String ownerName) { this.ownerName = ownerName; } public String getPhoneNumber() { return phoneNumber; } public void setPhoneNumber(String phoneNumber) { this.phoneNumber = phoneNumber; } public String getStreetAddress() { return streetAddress; } public void setStreetAddress(String streetAddress) { this.streetAddress = streetAddress; } public String getCity() { return city; } public void setCity(String city) { this.city = city; } public String getState() { return state; } public void setState(String state) { this.state = state; } public String getZipCode() { return zipCode; } public void setZipCode(String zipCode) { this.zipCode = zipCode; }
public void addRoom(double sqft, String fType){ rooms[roomIndex] = new Room(sqft,fType); roomIndex++; }
public double getInstallationCost(){ double totalCost=0; for(int i=0;i totalCost = totalCost + rooms[i].getFloorType().getFlooringCost(); } return totalCost; } }
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started