Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Java Expert


Home >> Java

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.

Java, Programming

  • Category:- Java
  • Reference No.:- M91768361
  • Price:- $75

Priced at Now at $75, Verified Solution

Have any Question?


Related Questions in Java

Retail price calculatorwrite a java program that asks the

Retail Price Calculator Write a JAVA program that asks the user to enter an item's wholesale cost and its markup percentage. It should then display the item's retail price. For example: (If an item's wholesale cost is 5. ...

Object-oriented software development1 introduction 11

OBJECT-ORIENTED SOFTWARE DEVELOPMENT 1. Introduction 1.1 Assignment Requirement 1.2 Deliverables and Structure (what to submit) 1.3 Software Restrictions 1.4 How to score high... 1.5 Assumptions 2. System Requirements 2. ...

Assignment game prototypeoverviewfor this assessment task

Assignment: Game Prototype Overview For this assessment task you are expected to construct a prototype level/area as a "proof of concept" for the game that you have designed in Assignment 1. The prototype should function ...

Assessment instructionsin this assessment you will design

Assessment Instructions In this assessment, you will design and code a simple Java application that defines a class, instantiate the class into a number of objects, and prints out the attributes of these objects in a spe ...

Answer the following question whats the difference public

Answer the following Question : What's the difference public inheritance and private inheritance? What can derived classes inherit from base classes? What cannot be inherited from base classes?

Assignment taskwrite a java console application that allows

Assignment task Write a java console application that allows the user to read, validate, store, display, sort and search data such as flight departure city (String), flight number (integer), flight distance (integer), fl ...

Assignment taskwrite a java console application that allows

Assignment task Write a java console application that allows the user to read, validate, store, display, sort and search data such as flight departure city (String), flight number (integer), flight distance (integer), fl ...

Fundamentals of operating systems and java

Fundamentals of Operating Systems and Java Programming Purpose of the assessment (with ULO Mapping) This assignment assesses the following Unit Learning Outcomes; students should be able to demonstrate their achievements ...

Applied software engineering assignment 1 -learning

Applied Software Engineering Assignment 1 - Learning outcomes - 1. Understand the notion of software engineering and why it is important. 2. Analyse the risk factors associated with phases of the software development lif ...

Simple order processing systemquestion given the classes

Simple Order Processing System Question: Given the classes Ship (with getter and setter), Speedboat, and SpeedboatTest. Answer the following questions: Refine the whole application (all classes) and create Abstract class ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As