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

  Determine the decision of java

Determine the decision of Java as the platform to develop this program. Identify the Java-based technologies utilized in this project and analyze each of them. Then, provide discussion on the purpose of each of the Java-based technologies utiliz..

  Design a course registration system

Create an application which represents a simplified course registration system using ArrayLists and HashMaps.

  Mvc pattern and servlet

When you use the MVC pattern, the controller directs the flow of control to

  Dijikstra for undirected graph using simple scheme

Dijikstra for undirected graph using simple scheme with array and fibonacci heap and compare the performance/results, preferably in java.

  Using a linked implementation of graph write a method

Write a method that takes two nodes as input and returns true if joining an edge between these two nodes, forms a duplicate path to one of the input nodes within the graph.

  Java threads

This is an introductory assignment on Java synchronization. You will use Java Threads while learning more about concurrency and achieving atomicity using Java’s inbuilt mechanisms.

  Design and implementation of a hangman game

Design and Implementation of a Hangman game

  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.

  Mean and standard deviation using using eclipse

Java programming to calculate Mean and standard deviation using Using Eclipse.

  Implement the lexical and syntactic analysis

Implement the lexical and syntactic analysis of Minifun programming language.

  Distributed systems

Build robust, secure distributed systems using advanced programming techniques

  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.

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