Create the default junit tests using netbeans

Assignment Help JAVA Programming
Reference no: EM131043924

JAVA ASSIGNMENT

Part I

This requires the use of NetBeans 8.1 and written in JAVA

The program should be called the HomeUtilityAuditingProject

1. There should be 3 files:

· 1 would be for the validation call it GUIValidator
· 1 would be the GUI (Swing GUI Form /JFrame Form) call it HomeApplianceFormMain
· 1 would be HomeAppliance

2. GUI Design

· The header label should be: Home Appliance Usage & Cost
· The first field should be Cost per Kilowatt Hour
· The second field should be Appliances

o For Part 1 I only need 1 appliance for Part 2 I need 5 to 7

· The third field should be Power Usage (Watts)
· The fourth field should be Hours Used Per Day
· There should be an error field under each of the fields that shows validation errors in red.
· There should be a Total Cost field which adds each daily total in the column, however this should be above the column
· There should be a Calculate Usage Cost Button and a Clear Button

o The calculate Usage Button should fill in the output area which would be:

Appliance Power Usage (Watts) Hours Used Per Day Daily Cost
Dryer 1100.0 8.5 $33.33

dailyCost=(Cost Per Kilowatt Hour*Power Usage in Watts*Hours Used Per Day/1000)

I would prefer this to be in a table if possible.

· The Clear Button would clear any data in the user input area.
· There should be a Clear All and an Exit Button, the Clear All Button should clear the user input area and the output area and the exit button should exit the GUI

3. Validator

Cost Per Kiolwatt Hour
cannot be blank
must be numbers
must be greater than 0 and less than 10,000
must be in a dollar format

Appliance
cannot be blank

Power Usage (Watts)
cannot be blank
must be numbers
must be greater than 0 and less than 10,000
must be in a 0.0 format

Hours User Per Day
cannot be blank
must be numbers
must be greater than 0 and it cannot be greater than 24 (less than 25)
must be in a 0.0 format

Part II

Update your program from last week. The user should be able to do the following:

Choose from a list of several appliances (not just one). I would prefer an array

Once an appliance is selected, the program will fill in the various input boxes with data filled in previously. By 'previously' I don't mean a previous running of the program. Rather, I mean in the same running of the program. So a user could choose the 'fan' appliance the first time, and all the input values would be blank (or 0). The user would enter data for the fan, then press the 'Update Appliance' button (or whatever your program takes as a signal to enter the data). The appliance values would be validated, and if valid, the fan would be entered into the list area. The user then chooses a different appliance, enters data and presses 'Update Appliance'. The data for that appliance gets handled. Then, if the user chooses the 'fan' again, the program would read the previously entered data for the fan and enter them into the various input boxes. The user could change them and press 'Update Appliance', and the app would update the values, recalculate the cost, and update the list area.

When the user chooses an appliance for the first time, make sure your program 'blanks out' or 'zeroes out' the input fields, because the user has never entered data for that appliance. This is an issue after the user has entered data for an appliance and then chooses a new appliance. If you're not careful, then the values for the previous appliance are still in the input fields for the new appliance.

PART III JTEST

Technical requirements:

Start with a working HomeAppliance class that implements set/get. It doesn't have to be perfect, but it has to have no syntax errors, and it must have get/set methods.

You are not allowed to modify your class. Use whatever you submitted in Part II.

Create the 'default' JUnit tests using NetBeans. Do this for the HomeAppliance class only; not for your JFrame GUI class.

Modify the 'set' tests so that you're setting your HomeAppliance instance fields to something other than 0.0. You should test for 0.0, but make sure you test for more values than just 0.0.

Run the tests. The purpose is NOT, repeat not, to show all the tests passing. Rather, the purpose is to write tests that fail if there are problems with the code being tested, and pass if there are no problems with the code being tested.

Screen capture your NetBeans window, showing the test source and the "Test Results" pane.

Submit the screen capture as well as your zipped project, as usual.

Reference no: EM131043924

Questions Cloud

Borrow money by issuing perpetual bonds with coupon rate : Illinois Industries has decided to borrow money by issuing perpetual bonds with a coupon rate of 9.5 percent, payable annually. The one-year interest rate is 9.5 percent. What will the market value of these bonds be if they are noncallable?
Forward contract price and the futures price : A futures contract expiring in April on Mexican pesos is avail­able now for $.08 per unit. Also, a forward contracts is available for the same settlement date at a price of $.085 per peso. How could speculators capitalize on this situation, assuming ..
Cashless collar with a financial institution : A company enters into a cashless collar with a financial institution: How much will the company receive from the financial institution upon physical settlement of natural gas for the month of March 2016?
About the individual retirement account : Bill plans to fund his individual retirement account (IRA) with the equal amount contribution at the end of year for the next 20 years. If Bill can earn 12 percent on his contributions and he wants to accumulate $1,000,000 at the end of twentieth yea..
Create the default junit tests using netbeans : Create the 'default' JUnit tests using NetBeans. Do this for the HomeAppliance class only; not for your JFrame GUI class.
Equity based compensation plan : Equity Based Compensation Plan Please create an equity based compensation plan for your fictitious company and explain why this can be the most powerful device available for a company.
Products exported by the sports exports company : SMALL BUSINESS DILEMMA Ensuring Payment for Products Exported by the Sports Exports CompanyThe Sports Exports Company produces footballs and exports them to a distributor in the United Kingdom.
Calculate the aftertax cash flows for first year for bond : Suppose your company needs to raise $45 million and you want to issue 30-year bonds for this purpose. Assume the required return on your bond issue will be 6 percent, and you’re evaluating two issue alternatives: Calculate the aftertax cash flows for..
Question regarding the long-term incentives : Please provide an example how long term incentive plans have helped a company meet their strategic goals. Explain whether or not you believe most long term incentives are attainable.

Reviews

Write a Review

JAVA Programming Questions & Answers

  Recursive factorial program

Write a class Array that encapsulates an array and provides bounds-checked access. Create a recursive factorial program that prompts the user for an integer N and writes out a series of equations representing the calculation of N!.

  Hunt the wumpus game

Reprot on Hunt the Wumpus Game has Source Code listing, screen captures and UML design here and also, may include Javadoc source here.

  Create a gui interface

Create GUI Interface in java programing with these function: Sort by last name and print all employees info, Sort by job title and print all employees info, Sort by weekly salary and print all employees info, search by job title and print that emp..

  Plot pois on a graph

Write a JAVA program that would get the locations of all the POIs from the file and plot them on a map.

  Write a university grading system in java

University grading system maintains number of tables to store, retrieve and manipulate student marks. Write a JAVA program that would simulate a number of cars.

  Wolves and sheep: design a game

This project is designed a game in java. you choose whether you'd like to write a wolf or a sheep agent. Then, you are assigned to either a "sheep" or a "wolf" team.

  Build a graphical user interface for displaying the image

Build a graphical user interface for displaying the image groups (= cluster) in JMJRST. Design and implement using a Swing interface.

  Determine the day of the week for new year''s day

This assignment contains a java project. Project evaluates the day of the week for New Year's Day.

  Write a java windowed application

Write a Java windowed application to do online quiz on general knowledge and the application also displays the quiz result.

  Input pairs of natural numbers

Java program to input pairs of natural numbers.

  Create classes implement java interface

Interface that contains a generic type. Create two classes that implement this interface.

  Java class, array, link list , generic class

These 14 questions covers java class, Array, link list , generic class.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd