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

  Loops and files

Convert an algorithm using control structures into Java and write a while loop

  Implementation activities of software development

Analysis, design, and implementation activities of software development

  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.

  Write a java program to register students for a college

Project is for designing and developing a College Registration program. Write a Java program to register students for a college

  Input pairs of natural numbers

Java program to input pairs of natural numbers.

  User session mgr - socket and thread programs

User Session Mgr - Socket and Thread Programs

  Implement avl tree

Implement AVL trees that allows both iterative traversal and recursive traversal.

  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.

  Prepare a java simulation program

Given a hash function h, prepare a java simulation program to determine each of the subsequent quantities after 0.8*tablesize random keys have been generated. The keys should be random integers.

  Implement a card game in java

In this assignment, you will be asked to implement a card game. You will need to make several design decisions for your code. It will be expected that all classes you write will utilize the principle of encapsulation.

  Create a recursive factorial program

Assignment 1: 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 !. For example, if the input is 4, the output could be:

  Write a program that assigns seats on an airplane

Prepare a program that teaches arithmetic to a young child. The program tests subtraction and addition. Write a program that assigns seats on an airplane.

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