• Join over 1.2 million students every month
  • Accelerate your learning by 29%
  • Unlimited access from just £6.99 per month
Page
  1. 1
    1
  2. 2
    2
  3. 3
    3
  4. 4
    4
  5. 5
    5
  6. 6
    6
  7. 7
    7
  8. 8
    8
  9. 9
    9
  10. 10
    10
  11. 11
    11
  12. 12
    12
  13. 13
    13
  14. 14
    14
  15. 15
    15
  16. 16
    16
  17. 17
    17
  18. 18
    18

What is Java?

Extracts from this document...

Introduction

Introduction 1.What is Java? Java is an object-oriented programming language developed initially by James Gosling and colleagues at Sun Microsystems. The language, initially called Oak (named after the oak trees outside Gosling's office), was intended to replace C++, although the feature set better resembles that of Objective C. Java should not be confused with JavaScript, which shares only the name and a similar C-like syntax. Sun Microsystems currently maintains and updates Java regularly. Source: en.wikipedia.org/wiki/Java_(language) A multi-platform, object-oriented programming language from Sun Microsystems. The Java language syntax is somewhat similar to C. Java can be used to program applications and applets. 2.Java Virtual Machine Java Virtual Machine - Also called a "Java Interpreter", "Java Runtime" - Converts byte code into OS specific commands. In addition to governing the execution of an application's byte codes, the virtual machine handles related tasks such as managing the system's memory, providing security against malicious code, and managing multiple threads of program execution. www.utstar.com/Glossary/G-K/ Java Virtual Machine (JVM) originally developed by Sun Microsystems, is a virtual machine that executes Java byte code. This code is most often generated by Java language compilers, although the JVM has also been targeted by compilers of other languages. The JVM is a crucial component of the Java platform. The availability of JVMs on many types of hardware and software platforms enables Java to function both as middleware and a platform in its own right. Hence the expression "Write once, run anywhere." The Java Virtual Machine is the cornerstone of the Java programming language. It is the component of the Java technology responsible for cross platform delivery. The JVM is an abstract computing machine and (just like a real computing machine) has a defined instruction set. The JVM knows nothing of the Java language, only of a particular file format, the class file format. A class file contains JVM instructions (or byte codes) ...read more.

Middle

Some languages do not make distinctions between data members and methods. Instance In a language where each object is created from a class, an object is called an instance of that class. If each object has a type, two objects with the same class would have the same data type. Creating an instance of a class is sometimes referred to as instantiating the class. Three properties characterize objects: 1. identity - the property of an object that distinguishes it from other objects 2. state - describes the data stored in the object 3. behavior - describes the methods in the object's interface by which the object can be used Some terms for specialized kinds of objects include: * Singleton object - An object that is the only instance of its class during the lifetime of the program. * Functor (function object) - an object with a single method (in C++, this method would be the function operator, "operator ()") that acts much like a function (like a C/C++ pointer to a function). * Immutable object - an object set up with a fixed state at creation time and which does not vary afterward. * First-class object - an object that can be used without restriction. * Container object - an object that can contain other objects. * Factory object - an object whose purpose is to create other objects * Metobject - an object from which other objects can be created (Compare with class, which is not necessarily an object) * Prototype - a specialized metaobject from which other objects can be created by copying Instantiation It refers to Instantiation principle - the idea that if properties exist, the essence that "has" the properties must necessarily exist. A concept in object-oriented programming, see Instance (programming), object lifetime The first moment of existence of a thing, whether living or not. The concept of the big bang theory, at the instant it happened, represents the instantiation of the universe. ...read more.

Conclusion

throws IOException { System.out.print("\nEnter the name of a Book:\t"); String name = br.readLine(); for(int i=0;i<bookTitle.length;i++) { if(name.equalsIgnoreCase(bookTitle[i])) { done = true; if(bookTitle[i] == "Jungle book") { System.out.println("\nBook Title Author Publisher Quantity Price"); System.out.println("================================================================================"); System.out.println(bookTitle[i]+" "+author[i]+" "+publisher[i]+" "+quantity[i]+" "+price[i]); } else if(bookTitle[i] == "Marketing") { System.out.println("\nBook Title Author Publisher Quantity Price"); System.out.println("================================================================================"); System.out.println(bookTitle[i]+" "+author[i]+" "+publisher[i]+" "+quantity[i]+" "+price[i]); } else if(bookTitle[i] == "Spider man") { System.out.println("\nBook Title Author Publisher Quantity Price"); System.out.println("================================================================================"); System.out.println(bookTitle[i]+" "+author[i]+" "+publisher[i]+" "+quantity[i]+" "+price[i]); } else if(bookTitle[i] == "Super Man") { System.out.println("\nBook Title Author Publisher Quantity Price"); System.out.println("================================================================================"); System.out.println(bookTitle[i]+" "+author[i]+" "+publisher[i]+" " +quantity[i]+" "+price[i]); } } } if(done == false) { System.out.println("\nBook not found:\t"); } callOptions(); } public void getPurchaseABook() throws IOException { System.out.print("\nEnter the name of the Book:\t\t"); String name = br.readLine(); for(int i=0;i<bookTitle.length;i++) { if(name.equalsIgnoreCase(bookTitle[i])) { done = true; System.out.print("What is the quantity you require?\t"); String acc = br.readLine(); int readAcc = Integer.parseInt(acc); int prices = Integer.parseInt(price[i]); double totalPrice = readAcc*prices; String total = String.valueOf(totalPrice); int realQuantity = Integer.parseInt(quantity[i]); int quantities = realQuantity - readAcc; String quant = String.valueOf(quantities); System.out.println("\nYour purchase details are as follows:"); System.out.println("\nBook Title\t\t"+bookTitle[i]); System.out.println("Author\t\t\t"+author[i]); System.out.println("Publisher\t\t"+publisher[i]); System.out.println("Quantity required\t"+readAcc); System.out.println("Unit price\t\t"+price[i]); System.out.println("Total Price\t\t"+total); System.out.print("\nPurchase this book? (Y for yes / N for no)\t" ); String getIt = br.readLine(); if(getIt.equalsIgnoreCase("y") ) { quantity[i] = quant; System.out.println("\nThank You For Your Visit. Hope to see you soon again!"); } else System.out.println("\nYou have selected No to stop the transaction. Thanks !"); } } if(done == false) { System.out.println("\nBook not found:\t"); } callOptions(); } public static void main(String args[])throws IOException { BookInventory obj = new BookInventory(); } } Conclusion The purpose of this program is to maintain the inventory of books that are been sold at Rave`s BOOK`s book shop. This program is developed by uisng Java which is a platform independent language. The java language supports security, relaibility, which is important to develop this program. The function of this program are searching of books, inputting the title and author on the system, displays the book details and the request of number of copies required and display the total cost of copies. ?? ?? ?? ?? 1 ...read more.

The above preview is unformatted text

This student written piece of work is one of many that can be found in our AS and A Level Computer Science section.

Found what you're looking for?

  • Start learning 29% faster today
  • 150,000+ documents available
  • Just £6.99 a month

Not the one? Search for your essay title...
  • Join over 1.2 million students every month
  • Accelerate your learning by 29%
  • Unlimited access from just £6.99 per month

See related essaysSee related essays

Related AS and A Level Computer Science essays

  1. Computing Project

    The 'member table' will contain the entire customers which are registered with the shop. When one of the customers wants to rent out a DVD, the user has to make sure that DVD is available to rent out so what I am going to do in this system is that

  2. Business blue print document for the implementation of SAP R/3 (4.6B) payroll at Mastek ...

    * Personnel IDs infotype (0185)* * These infotypes have been modified to handle Indian requirements. India-specific infotypes containing payment information: - These infotypes have been created for India payroll only: - * Previous employment tax details infotype (0580) * Housing (HRA/CLA/COA)

  1. Computer Architecture

    (0) (1) B1 B2 B3 B4 ______________ (1)(1)(1) C3 C2 C1 (1)(0)(1)(0)(0) O S4 S3 S2 S1 Task 10 (D2) Compare and contrast two different processors I will compare the AMD Opteron quad core and the Intel core 2 quad processor q9650.

  2. Control Unit, Memory Unit, and Arithmetic Logic Unit. The CPU or Central Processing ...

    where the device may suffer from vandalism. They are also useful for users who would find difficulty using other input devices, e.g. very young children who want to be able to draw on a screen. b) Printers. A printer is a device which provides the user with an output from the system which is permanent.

  1. GCSE I.T Security Case Study - Riverside Leisure Centre

    Any data processors that a data controller may use for processing their data must be professional enough to guarantee the privacy and security of the data. It is also the data controller's responsibility to ensure that the data processor carries out the processing as specified according to an agreed contract.

  2. LAN &amp;amp; WAN Protocols

    It works at the data link layer. It is an important protocol because together working with IPv6 at the core of standards based internetworking ways of the Internet. IPv4 is also vastly deployed Internet layer protocol. IGP It stands for Interior Gateway Protocol. It used within an autonomous system (AS).

  1. Influential Factors in Choosing a Programming Language

    This could be computer setups such as Windows, OS X, a Linux-based OS, a web-based application, a smart phone-based app or the option to be platform agnostic could also be desired. Languages that are built to be natively run on one platform (like C++)

  2. Explain sequence, selection and iteration as used in computer programming; outline the benefits of ...

    The route that is taken depends on if specified criteria have been met. (Anderson, 2010) In Visual Basic, this is done using the if keyword. The following diagram illustrates this process as a flowchart: (Chapman, 2011) What is happening here is that if a variable equals a specified value as

  • Over 160,000 pieces
    of student written work
  • Annotated by
    experienced teachers
  • Ideas and feedback to
    improve your own work