Java program for line item application

Assignment Help JAVA Programming
Reference no: EM1347264

Q1) Enhance the Line Item application

This exercise explains you the process of testing and enhancing Line Item application.

1. Open LineItemApp, Validator, Product, LineItem, and ProductDB classes that are in the c:java1.6ch06LineItem directory and review this code.

2. Compile all five classes. If the compiler throws an error that indicates that it can't "resolve" a class, you need to set your class path correctly as described in chapter 1. Once you've compiled these classes, run the LineItemApp class with valid codes like "java", "jsps", and "mcb2" to make sure that this application works correctly. Then, test it with an invalid code to see how that works.

3. Add another product to the ProductDB class. Its code should be "txtp", its description should be "TextPad", and its price should be $20.00. Then, compile just this class, and test the LineItemApp class again with the new product code. This shows that you can make a change to a class without affecting the other classes that use it.

4. Add a static field to the LineItem class that will count the number of objects that are created from the class as shown in figure 6-15. Next, add the code that increments this field each time an object is created from this class, and add a method named getObjectCount that gets the value of this field. Then, compile that class.

5. Modify the LineItemApp class so it uses the getObjectCount method and displays the object count on the console after it displays each line item. Then, compile and run that class to make sure that the changes in steps 4 and 5 work correctly.

Reference no: EM1347264

Questions Cloud

Show the motivation and conflict management : Show how different organizations apply motivation theories to motivate employees and examine which conflict management approaches work best in the organizations
Cash flow statement-cost-volume-profit measures risk : Online financial databases, like Lexis/Nexis and the Dow Jones News Retrieval Service, give data on thousands of companies. Assume you want to compare some companies' recent earnings histories. You may have the computer compare companies' returns ..
Elucidate does the coffee market meet all six conditions : Is the market for coffee perfectly competitive. Elucidate does the coffee market meet all six conditions of a perfectly competitive market.
Determination of portfolio standard deviation : Suppose you own a portfolio that has 35 percent invested in asset A, and 65 percent in asset B. Asset A's standard deviation is 12 percent and asset B's standard deviation is 18 percent.
Java program for line item application : This exercise explains you the process of testing and enhancing Line Item application. Open LineItemApp, Validator, Product, LineItem, and ProductDB classes that are in the c:java1.6ch06LineItem directory and review this code.
Business ethics-shareholder vs stakeholder : Describe and critiquing the two most prominent approaches to the nature of Business: shareholder and stakeholder theory and find these approaches both from a theoretical point of view and from a practical point of view.
What power be delivered to the solenoid : A dentist uses a small mirror of radius 44mm to locate a cavity in a patient's tooth. If the mirror is concave and is held 13 mm from the tooth, what is magnification of the image.
Breakeven cvp changes in operating income : Compute the firm's current contribution margin ratio and break-even in revenues. Recalculate contribution margin ratio and breakeven in sales if new machine is leased. What is the firm's operating income supposing that the new machine is leased?
Explain how do the life-cycle hypothesis resolve : Explain how do the life-cycle hypothesis also the permanent income hypothesis resolve the seemingly inconsistent pieces of evidence regarding consumption behaviour.

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