Free Essay

Java Inventory#4

In:

Submitted By Bonifi999
Words 604
Pages 3
01 public class Inventory3 {
02
03 public static void main(String args []) {
04 Inventory invent = new Inventory();
05 Movie dvd;
05
07 dvd = new Movie("Movie1", 1, "IP Man", 5, 14.95);
08 invent.add(dvd);
09 dvd = new Movie("Movie2", 2, "Book Of Eli", 10, 12.99);
10 invent.add(dvd);
11 dvd = new Movie("Movie3", 3, "Man of Fire", 6, 19.99);
12 invent.add(dvd);
13 dvd = new Movie("Movie4", 4, "The Brothers Grimm", 3, 10.99);
14 invent.add(dvd);
15
16 invent.display();
17 } //end main
18
19 } // end class Inventory3
20
21
22 class DVD {
23 private int dvdItem;
24 private String dvdTitle;
25 private int dvdStock;
26 private double dvdPrice;
27
28 public DVD(int item, String title, int stock, double price) {
29 dvdItem = item;
30 dvdTitle = title;
31 dvdStock = stock;
32 dvdPrice = price;
33 } //end four-argument constructor
34
35 // set DVD Item
36 public void setDvdItem(int item) {
37 dvdItem = item;
38 } //end method set Dvd Item
39
40 //return DVD Item
41 public int getDvdItem() {
42 return dvdItem;
43 } //end method get Dvd Item
44
45 //set DVD Title
46 public void setDvdTitle(String title) {
47 dvdTitle = title;
48 } //end method set Dvd Title
49
50 //return Dvd Title
51 public String getDvdTitle() {
52 return dvdTitle;
53 } //end method get Dvd Title
54
55 public void setDvdStock(int stock) {
56 dvdStock = stock;
57 } //end method set Dvd Stock
58
59 //return dvd Stock
60 public int getDvdStock() {
61 return dvdStock;
62 } //end method get Dvd Stock
63
64 public void setDvdPrice(double price) {
65 dvdPrice = price;
66 } //end method setdvdPrice
67
68 //return DVD Price
69 public double getDvdPrice() {
70 return dvdPrice;
71 } //end method get Dvd Price
72
73 //calculate inventory value
74 public double value() {
75 return dvdPrice * dvdStock;
76 } //end method value
77
78 public String toString() {
79 return String.format("item=%3d title=%-20s units=%3d price=$%6.2f value=$%7.2f",
80 dvdItem, dvdTitle, dvdStock, dvdPrice, value());
81 }
82
83 } //end class DVD
84
85
86 class Movie extends DVD {
87 private String movieTitle;
88
89 public Movie(String title, int item, String dtitle, int stock, double price) {
90 super(item, dtitle, stock, price);
91 movieTitle = title;
92 }
93
94 public double value() {
95 double value = getDvdPrice() * getDvdStock();
96 value = 1.05 * value;
97 return value;
98 } //end method value
99
100 public String toString() {
101 String s = String.format("Movie title=%-12s", movieTitle);
102 s = s + " " + super.toString();
103 return s;
104 }
105
106 } // end class Movie class Inventory {

107 private DVD[] dvds;
108 private int count;
109
110 Inventory() {
111 dvds = new DVD[10];
112 count = 0;
113 }
114
115 public void add(DVD dvd) {
116 dvds[count] = dvd;
117 ++count;
118 sort();
119 }
120
121 public double entireValue() {
122 double value = 0;
123 for (int i = 0; i < count; i++) {
124 value = value + dvds[i].value();
125 }
126 return value;
127 }
128
129 public void sort() {
130 for (int index = 1; index < count; index++) {
131 DVD key = dvds[index];
132 int position = index;
133
134 // Shift larger values to the right
135 while (position > 0 && key.getDvdTitle().compareTo(dvds[position-1].getDvdTitle()) < 0) {
136 dvds[position] = dvds[position-1]; position--;
137 }
138 dvds[position] = key;
139 }
140 }
141
142 public void display() {
143 System.out.println("\nThe inventory contains " + count + " DVDs\n");
144 for (int i = 0; i < count; i++)
145 System.out.printf("%3d %s\n", i, dvds[i]);
146 System.out.printf("\nThe total inventory value is $%.2f\n\n", entireValue());
147 }
148
149 } // end class Inventory

Similar Documents

Free Essay

Master

...Automated Inventory Management Project Report Chao Li Spring 2006 Abstract With rapid growth of human-computer interaction, more and more useful software are replacing human efforts. The system we propose in this report integrates the idea to automated , instead of manually, manage inventory of a restaurant’s liquor, meanwhile it can generate sales report, inventory report, etc, which all require human efforts previously. As a result, this new system can reduce possible human errors and provide accurate information of inventory at any point. Introduction Nowadays, more and more companies tend to use any available software to maintain information over a long term. We design the Automated Inventory Management System to approach this goal with features that help improve data consistency, maintain necessary inventory level. With these goals in mind, we decide to incorporate design philosophy as well as user friendly interface into the system, meanwhile to have powerful functions that manifest all the users’ requirements and needs. One concern is how to reflect inventory level as quick as possible, since the sales of liquor occupy a large proportion compared with the daily transactions of the entire restaurant. Therefore, liquor’s inventory level changes constantly. In order to monitor these changes over periods, the Automated Inventory Management System can efficiently and accurately accomplish it while provides other...

Words: 2794 - Pages: 12

Free Essay

Thesis

...SUMMARY, CONCLUSION AND RECOMMENDATION Summary Because Lots A Pizza Bayan, Dasmariñas City is having difficulty using the manual process of their inventory and sales the researchers used this opportunity to develop a LAN-based inventory and sales management system for them. It minimized the manual task and maximized the employees’ time on doing their work because it lessens the time on generating sales and inventory summaries and reports. The researchers used NetBeans 7.1.1 Java SE as programming language and MySQL 5.1 command line client as database server. They started the development of the system on November 2011 and finished on January 2013. Conclusion The new system minimizes the time needed in managing and monitoring of inventory and sales of the business and it lessens the time and difficulty in generating reports. Based on the evaluation , the system got a mean 4.40 that proved to be very satisfactory and the system helps the employees to manage inventories and notify them that if there are critical stocks in the inventory. The system minimizes the effort in monitoring of sales performance and checking of inventory status. Delivery transactions are being organized and queued according to their date of transaction with the aid of the system. Advance delivery orders are accommodated by the system in proper queue and the system notify the user if there are advance orders. The system provides reports for sales performance. The system proved to be very satisfactory...

Words: 597 - Pages: 3

Premium Essay

Inventory System

...INVENTORY MANAGEMENT SYSTEM Arina Ramlee arina@cs.washington.edu David Henry davidvh@cs.washington.edu Bruce Chhay chhayb@cs.washington.edu April 4, 2006 CSE 403 Assignment 1 – LCO Abstract This paper describes the Inventory Management System sufficiently to determine the feasibility and usability of a finished system. The core concept is to track the sale of items from the cash registers with additional features for interpreting the data. It uses a client-server model with a connected database to allow multiple stores and warehouses to be connected. This allows for later expansion while still supporting the targeted small businesses. The core features and final framework should be completed within 2 weeks, leaving 5 weeks to implement additional features and testing. 1. Operational Concepts The Inventory Management System is a real-time inventory database capable of connecting multiple stores. This can be used to track the inventory of a single store, or to manage the distribution of stock between several branches of a larger franchise. However, the system merely records sales and restocking data and provides notification of low stock at any location through email at a specified interval. The goal is to reduce the strain of tracking rather than to handle all store maintenance. Further features may include the ability to generate reports of sales, but again the interpretation is left to the management. In addition, since theft...

Words: 1417 - Pages: 6

Premium Essay

Acc206: Principles of Accounting 11

...NAME: CLASS ACC206: PRINCIPLES OF ACCOUNTING 11 WEEK 4: WEEK FIVE PROBLEMS PROFESSOR: ANGELA SNEED DATE: 07/05/2012. Week Five Problems Chapter 22, E 22-19 Chapter 22, P 22-22A Chapter 23, P 23-28A E22-19 Preparing a financial budget Consider the following June actual ending balances and July 31, 2012, Budgeted amounts for Oleans.com: a. June 30 inventory balance, $17,750 b. July payments for inventory, $4,300 c. July payments of accounts payable and accrued liabilities, $8,200 d. June 30 accounts payable balance, $10,600 e. June 30 furniture and fixtures balance, $34,500; accumulated depreciation balance, $29,830 f. June 30 equity, $28,360 g. July depreciation expense, $900 h. Cost of goods sold, 50% of sales i. Other July expenses, including income tax, total $6,000, paid in cash j. June 30 cash balance, $11,400 k. July Budgeted credit sales, $12,700 l. June 30 accounts receivable balance, $5,140 m. July cash receipts, $14,200 Requirement 1. Prepare a budgeted balance sheet. E 22-19 Requisition. 1 | Cash + | Accounts receivable+ | Inventory+ | Furniture+ | (Accum. Deprec.) | = | Accounts payable + | Stockholders’ equity | June 30 balance | J)$11,400 | l)$5,140 | A)$17,750 | E)$34,500 | E)$(29,830) | = | D)$10,600 | F)$28,360 | Payments for inventory | B)(4,300) | | 4,300 | | | = | | | Payments on account | (8,200) | | | | | = | C)(8,200) | | Depreciation | | | | | G)(900) | = | | (900)...

Words: 1868 - Pages: 8

Premium Essay

Automate Inventory System

...describes the Inventory Management System sufficiently to determine the feasibility and usability of a finished system. The core concept is to track the sale of items from the cash registers with additional features for interpreting the data. It uses a client-server model with a connected database to allow multiple stores and warehouses to be connected. This allows for later expansion while still supporting the targeted small businesses. The core features and final framework should be completed within 2 weeks, leaving 5 weeks to implement additional features and testing. 1. Operational Concepts The Inventory Management System is a real-time inventory database capable of connecting multiple stores. This can be used to track the inventory of a single store, or to manage the distribution of stock between several branches of a larger franchise. However, the system merely records sales and restocking data and provides notification of low stock at any location through email at a specified interval. The goal is to reduce the strain of tracking rather than to handle all store maintenance. Further features may include the ability to generate reports of sales, but again the interpretation is left to the management. In addition, since theft does occasionally occur, the system provides solutions for confirming the store inventory and for correcting stock quantities. 2. System Requirements The Inventory Management System uses a web-based interface to display inventory data...

Words: 1331 - Pages: 6

Premium Essay

Inventory

...General Services Office Inventory System Chapter 1 THE PROBLEM AND ITS BACKGROUND Introduction Computer systems and applications are basic tools used for companies and even small businesses nowadays. In order to make the tasks easier and avoid time consuming, computer technologies are now a big help. It provides tools for the employees in every office for easy tracks of daily activities related to their jobs. The computer systems and applications we create plays a vital role to make the daily works made easier, less time and efforts, more productive and accurate especially in an establishments like school offices. Computerization is now the basic necessity for every establishment, yet there are also still using manual methods which make them outdated. The General Services Office (GSO) of Divine Word College of San Jose is one of the offices which used manual methods for keeping records and transactions which make them consume lot of time and effort to find and manage all the information they needed. The data and transactions may not 100% reliable because it is handwritten and or because of human error lack of detection. The General Services Office Inventory and Scheduling system is designed to give accurate data about the first in and first out items within the office and provide accurate information on day to day schedules and reservations of specific rooms to avoid errors and conflicts to a certain schedules. The personnel in charge for the system have a convenient...

Words: 1865 - Pages: 8

Premium Essay

Coffeehouse Business Plan

...Thanks for downloading a sample plan from Bplans.com A sample plan is a great way to get started, but you can’t just print this plan out and turn it into the bank. You’re still going to have to put in all your own information and do all of your own financial forecasts. With LivePlan, you can easily use this sample as inspiration and create your own plan, complete with financial tables and graphs. You’ll also be able to: • Save time with linked financial tables (the formulas are built in, so you don’t have to do the calculations!) • Benefit from tons of help, advice, and resources. • Present your plan with confidence, with automatic charts and graphs corresponding to your financial data. • Work on your plan anywhere, on any computer. “For 20 dollars I ended up getting a quarter of a million dollars of funding. That’s worth it!” – Todd C. Tablegate Click here to save 50% off the first month of LivePlan! Cover Page [pic]         This sample business plan has been made available to users of Business Plan Pro®, business planning software published by Palo Alto Software. Names, locations and numbers may have been changed, and substantial portions of the original plan text may have been omitted to preserve confidentiality and proprietary information. You are welcome to use this plan as a starting point to create your own, but you do not have permission to reproduce, resell, publish, distribute or even copy this plan as it exists...

Words: 10662 - Pages: 43

Premium Essay

The Role of Operations Management in Competing with Effective Strategy

..."THE ROLE OF OPERATIONS MANAGEMENT in competing WITH EFFECTIVE STRATEGY " Product: Bottled Drinking Water (bottled water) Brand: CHEERS Company: PT. Atlantic Biruraya Established: 1996 Company Location: Pandaan, East Java Main Factory: Pandaan, East Java Factory Client: Jakarta, Bali, Makassar 1. INTRODUCTION As stated in each printed books education of primary school age, "Water is the source of life", we often got the knowledge that 55% to 78% of the human body consists of water and human beings can only survive five days without water. In the context of a healthy life, of the water in question is clean water. This is the rationale of every person to utilize and develop it into a renewable thing. Scientists are racing to examine the benefits of content that is in the water, process it to obtain beneficial results for the purpose. Water into the basic human needs for survival, and began trading in the form of packaging with different sizes, types and prices. In Indonesia, we call it a Bottled Drinking Water (bottled water). Bottled water was introduced nationally in 1973 by Mr. Tirto Utomo, who was born in Wonosobo (1930-1994). With his company PT. Golden Mississippi, he was producing Bottled Drinking Water labeled AQUA. Together AQUA, people are introduced to a wide variety of convenience to obtain household water is ready to drink, bottled water is easy to carry, easy to purchase, and product availability are always maintained. AQUA also made significant...

Words: 2687 - Pages: 11

Free Essay

Project Part 1 Task 2

...Requirements Format: Microsoft Word Font: Arial, Size 12, Double-Space Citation Style: Chicago Manual of Style Length: 1–2 pages Due By: Unit 3 Self-Assessment Checklist * I have researched and evaluated various open source software for each server. * I have recommended open source software for each server providing rationale for my recommendation. Here is a list of various open source software for the servers used at First World Bank Savings and Loan. Below are the recommendations and reasons why. 1. Zenoss Zenoss is an open source IT Management suite. You can observe and monitor your entire network using Zenoss. It consissts of an alert console, network discovery, performance monitoring, service monitoring, and inventory modules. It is enterprise-ready, free, easy to install and maintain, and modular through ZenPacks. 2. Mono Mono is the open source implementation of Microsoft's .NET technologies. Sponsored by Novell, this technology combines two incompatible worlds (*nix and Microsoft) into a single agile , open source and stable realm. Mono allows you to develop powerful and advanced server-side applications on Linux, Mac OS X and Windows. 3. Apache The Apache Web Server is the Internet's most popular Web server, and the project everyone associates with apache.org. However, there are over 70 other projects under the Apache umbrella. Enterprise-level projects include ActiveMQ,...

Words: 878 - Pages: 4

Free Essay

Oracle Ebs

...2. The EBS architecture 2.1 Desktop Tier 2.2 Application Tier 2.3 Database Tier 3. Oracle EBS database features 3.1 Monitoring Features 3.2 Performance Features 3.3 Scalability Features 3.4 Business Intelligence Features 3.5 Security Features 4. Oracle EBS user list 5. Oracle EBS success stories 5.1 Home Box Office (HBO) 5.2 Mallcom limited 5.3 AT&T INC. 5.4 Facebook 5.5 HCL 1.1 ORACLE EBS Oracle's E-Business Suite (also known as Applications/Apps or EB-Suite/EBS) consists of a collection of enterprise resource planning (ERP), customer relationship management(CRM), and supply-chain management (SCM) computer applications either developed or acquired by Oracle. The software utilizes Oracle's core Oracle relational database management system technology. The E-Business Suite contains several product lines often known by short acronyms. Significant technologies incorporated into the applications include the Oracle database technologies, (engines for RDBMS, PL/SQL, Java, .NET, HTML and XML), the "technology stack" (Oracle Forms Server, Oracle Reports Server, Apache Web Server, Oracle Discoverer, Jinitiator and Sun's Java). Oracle Corporation brands the on-line technical documentation of E-Business Suite as eTRM — "E-Business Suite Technical Reference Manuals". The applications found in the Oracle EBS include: * Oracle CRM * Oracle Financials * Oracle Human Resource Management System...

Words: 7162 - Pages: 29

Free Essay

Design

...ABAP (Advanced Business Application Programming) ABAP Workbench The ABAP Workbench component is a fully-fledged development environment for applications in the ABAP language. With it, you can create, edit, test, and organize application developments. It is fully integrated in the R/3 Basis system and, like other R/3 applications, is itself written in ABAP. Application Servers R/3 programs run on application servers. They are an important component of the R/3 System. The following sections describe application servers in more detail. Structure of an Application Server The application layer of an R/3 System is made up of the application servers and the message server. Application programs in an R/3 System are run on application servers. The application servers communicate with the presentation components, the database, and also with each other, using the message server. The following diagram shows the structure of an application server: [pic] The individual components are: Work Processes An application server contains work processes, which are components that can run an application. Each work process is linked to a memory area containing the context of the application being run. The context contains the current data for the application program. This needs to be available in each dialog step. Dispatcher Each application server contains a dispatcher. The dispatcher is the link between the work processes and the users logged onto the application server. Its...

Words: 2346 - Pages: 10

Free Essay

Econ202

...Exam 2 Review Chapter 4 -The components of IT infrastructure: computer hardware, software, data management technology( organizes, manages, and processes business data concerned with inventory, customers and vendors), networking and telecommunications technology, and technology services. -Two major types of computer software used in business: system software and application software. System software coordinates the various parts of the computer system and mediates between application software and computer hardware. Application software is used to develop specific business applications. -Cloud computing provides computer processing, storage, software, and other services as virtualized resources over a network, primarily the Internet, on an as-needed basis. -Mangers and information systems specialists need to pay special attention to hardware capacity planning the scalability to ensure that the firm has enough computing power for its current and future needs. -Example: BART(bay area rapid transit) speeds up with a new IT infrastructure. Oracle’s Peoplesoft enterprise applications replaced legacy applications. Used blade servers, grid architecture, and virtualization, increasing server capacity utilization to 50% or more. It demonstrates IT’s role in using resources more efficiently, reducing computer energy usage, modernizing services. -IT infrastructure: provides platform for supporting all information systems in the business. -Hardware: types of computers: mobile...

Words: 486 - Pages: 2

Premium Essay

Manager

... • Plan and perform effective software testing through a combination of familiar structured test techniques, rapid test practices and test automation where applicable. Experience Summary: ✓ Sound Experience in Full Software Testing Life Cycle (Involvement in Test Strategy, Test cases, Test Scripts/Data, Defect tracking/prevention) and its most of phases e.g. Unit Testing, Functional Testing, Regression Testing, Integration Testing, System Testing and User Acceptance Testing, Ajax Testing. ✓ Adherence to software development life cycle, quality methodologies (ISO 9001/CMM) and best practices of software testing models (Agile Methodology). ✓ Expert in both Manual testing and Automated testing Using tools Selenium - Java. ✓ Experience in Functional & GUI testing in CRM and ERP domain. ✓ Experience in Database Testing (MySql). ✓ Successfully Participated in 32 hrs training on automation tools such as Mercury Interactive Quick Test Pro 9.2, Test Director (QC). ✓ Solid communicator with exceptional team-building skills. ✓ Strong problem-solver, design solutions and assist developers with issues. Employment History: • Over all experience more than six years along with project management. • Working as Sr. Test Lead in HCL Technologies Limited, Bangalore since Sep. 2011 to till date. • Working as Sr. QA Engineer in BKA Software Pvt. Ltd, Bangalore since Oct. 2006 to Sep. 2011. • Worked as an Asst. Engineer (QA)...

Words: 1430 - Pages: 6

Premium Essay

Sem 5 Bca

...of Pune University of Pune University of Pune University of Pune University of Pune University of Pune University of Pune University of Pune University of Pune University of Pune University of Pune University of Pune University of Pune University of Pune University of Pune University of Pune University of Pune University of Pune University of Pune University of Pune Pattern 2008, w.e.f. 2010-11 Semester – V Course No. 501 502 503 504 505 506 Subject Name VB.NET or VB.NET Programming Internet Programming and Cyber Law Principals of Marketing Core Java Project work ( VB ) Computer Laboratory and Practical Work (.NET + Core Java ) Semester – VI Course No. 601 602 603 604 605 606 Subject Names E-Commerce Multimedia Systems Introduction to Syspro And Operating Systems Advance Java Project Work (Banking & Finance, Cost Analysis, Financial Analysis, Payroll, EDP, ERP etc.) Computer Laboratory and Practical Work (Multimedia + Advanced Java) University of Pune, T.Y. B.C.A., Semester V & VI 2 T.Y. B.C.A. Semester V Subject Name -: VB.NET or VB.NET Programming. Course Code -: 501 Sr. No. 1. TOPICS .NET Framework (Introduction to .NET Framework) 1.1 Introduction 1.2 CLR 1.3 CTS 1.4 MSIL 1.5 Garbage Collection 1.6 Assemblies 1.6.1 Assembly content 1.6.2 Assembly types VB.Net Programming 2.1 Windows Forms 2.1.1. Setting Title Bar Text 2.1.2. Seeing the initial position of a form 2.1.3. Minimizing/Maximising a form 2.1.4. Working with multiple forms 2.1.5. Setting the StartUp Form 2.1...

Words: 3973 - Pages: 16

Free Essay

Scholar

...“Markup Sprachen und semi-strukturierte Daten” http://www.pms.informatik.uni-muenchen.de/lehre/markupsemistrukt/02ss XSLT 1.0 Tutorial Dan Olteanu Dan.Olteanu@pms.informatik.uni-muenchen.de What means XSLT? XSL (eXtensible Stylesheet Language) consists of • XSL-T (Transformation) – primarily designed for transforming the structure of an XML document – W3C Specification: http://www.w3c.org/TR/xslt • XSL-FO (Formating Objects) – designed for formatting XML documents – W3C Specification: http://www.w3c.org/TR/xsl XSLT origin: Document Style Semantics and Specification Language (DSSSL, pron. Dissel). Why Transform XML? XML is a success because it is designed: • for separation between content and presentation (XML is a generic markup language) • as a format for electronical data interchange(EDI) between computer programs • as human readable/writable format Transforming XML is not only desirable, but necessary. XSLT is an attempt to fulfill this need, by supporting • publishing data (not necessarily XML). • conversion between two proprietary formats (not necessarily XML). Publishing XML data Data Conversion How XML data can be transformed using XSLT? (1/3) 1 a conversion of XML data into a tree structure, e.g. using an XML parser conformant to – Document Object Model (DOM) http://www.w3.org/DOM/ – Simple Api for XML (SAX) http://www.megginson.com/SAX/sax.html Tree structure XML fragment This is an example para XML Parser DOM/SAX ...

Words: 2148 - Pages: 9