• 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. GCSE I.T Security Case Study - Riverside Leisure Centre

    This controls, although doesn't block altogether, the threat of viruses and unauthorised access to the data. However, such a program does have one main disadvantage Anti-virus Software Surprisingly, Riverside's systems are not yet equipped with anti-virus software. This would be a good investment as a good quality program such as

  2. Signal Theory

    Synchronous It does not use start or stop bits but instead it synchronizes the transmission speed with receiving and sending end of transmission using the clock signals specifically built for each of the components. After this constant streams of data are transmitted between two sources.

  1. Influential Factors in Choosing a Programming Language

    will be chosen, as is whether appropriate features are included in the chosen IDE. (Anderson, 2010, p.166) Availability of Trained Staff If a language is popular and used widely (such as Java, C, or C++ (TIOBE, 2011)), then there will be more professionals that are able to code in it than there are for less popular languages.

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

    g) Scanners. A scanner is a device that converts a document into a series of pixels (picture elements - these are small squares that, when put together, form a picture). The larger the number of pixels, or conversely the smaller each individual pixel, the better the definition of the final picture.

  1. 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

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

    1.6.2 WAGE AND SALARY PAYMENTS Purpose The process of wage and salary payment allows you to make payments to third parties as well as to your employees. This process supports different payment medium, for example, bank transfers and cheques. Prerequisites The employee master data contains the following payment data: - Infotypes used from International version.

  1. What is transaction processing?

    This method of communication would therefore save company money in postage and time in producing multiply documents, overheads of consumable such as paper would be reduced, as well as the dispatch and delivery time. Within the Email program there are facilities to add attachment; this could be anything from programs, images and photographs to just simple documents.

  2. Free essay

    Hardware and Functions of a Micro Processor

    Control Bus - The control bus is extensive and is found at all parts of the computer system. It is present in the input output devices, main memory, disk space, and ultimately the CPU. The idea of the control bus is to manage the electrical signals and ensures that data

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