• Join over 1.2 million students every month
  • Accelerate your learning by 29%
  • Unlimited access from just £6.99 per month

I have been heavily involved with programming throughout my high school career. I've studied two years of Java and have taken two college courses at Milwaukee School of Engineering, which covered C++.

Extracts from this document...

Introduction

IB Extended Essay Java Vs C++ Matthew Stanelle Abstract: I have been heavily involved with programming throughout my high school career. I've studied two years of Java and have taken two college courses at Milwaukee School of Engineering, which covered C++. I have a good background in both languages. Though familiar with the languages, I have analyzed the differences between the two in-depth and clearly stated the advantages Java has over C++. I will explore many various topics and issues regarding both languages, including object-orientation, primitive types, development processes, architecture, and their effectiveness. As you will see, Java has many superior qualities and offers great advances for the computer programming industries in the near future. This new design offers many opportunities. Contents Page: Introduction Page 3 Body Page 3 Object-orientation Page 3 Primitives Page 4 Robust Page 4 Development Process Page 5 Security Page 5 Architecturally Neutral Page 5 Multithreading Page 6 Garbage Collection Page 6 Pointers and Data Structures Page 6 Conclusion Page 7 Bibliography Page 8 Word Count = 3,163 Intro: Java is one of the greatest advancements in the history of computer programming and is derived from C++. Programs written in C++ need to be compiled according to each particular computer chip. Thus, when new chips come out, most software must be recompiled. ...read more.

Middle

All numeric types in Java are signed, whereas they can be signed or unsigned in C++. Boolean data types are primitive requiring them to be true or false, instead of having no explicit Boolean data type in C++. Thus, conditions are either true or false and not represented with integers. Also, Java makes use of 16-bit Unicode characters and C++ uses 8-bit ASCII characters. ROBUST Java is generally more robust than C++ for several reasons. Firstly, references, or handles, are automatically initialized to null. Secondly, those same references are checked before they're accessed and before exceptions are thrown (if any problems occur). Thirdly, accessing arrays out of bounds is impossible. And finally, automatic garbage collection prevents memory leaks. Java emphasizes early error checking to prevent possible problems, dynamic runtime checking, and avoiding erroneous situations; Java creates a robust runtime environment for all of its programs. . Although C++ derived strong compile-time checking from C, it is still's susceptible to its loopholes. Implicit Declaration is one of the main characteristics of C, which causes C++ to be so error prone6. The advantage of this is the elimination of having to worry about corrupting or freeing memory. There are no loopholes in Java that would compare to what you would find with C++, since it eliminates implicit types and function declarations. ...read more.

Conclusion

Although the actual performance is reliant on the operating system, multithreading usually increases the performance. GARBAGE COLLECTION Garbage collection is a technique that, in Java, disposes of objects, which are no longer needed. In the form of a thread, this function watches all references and periodically checks each one to determine if it's still needed. At that point, the garbage collection frees all of the memory allocated for that object. Garbage collection makes programming easier and can eliminate entire classes of errors. This feature was left out of the development of C++ because this would have caused a conflict with C as far as compatibility is concerned. Automatic garbage collection wasn't suitable for many low-level tasks that its intended for in C++. However, there aren't any compatabilty issues with Java. Thus, this feature was incorporated into the language and now, programmers don't have to concern themselves with free blocks of memory, making the language safe and simplistic POINTERS AND DATA STRUCTURES Java lacks pointers and specific data structures, but that's not a bad thing. Unlike C++, several data structures classes can be found in the standard version of Java; contained in the standard class library. Java does not support pointers, or at least Java will not allow the developer to change any address contained in the pointer, nor will it support the use of pointer arithmetic. Unlike Java, C++ supports pointers with dereferencing (* or ->) and with address operators (&) that can lead to potential memory leaks10. ...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. Visual basic

    p1p = p1p + 1 Timer2.Enabled = True End If If X1.Visible = True And X4.Visible = True And X7.Visible = True Then MsgBox "Player X wins", vbOKOnly, "The End" Timer2.Enabled = False lösch p1p = p1p + 1 Timer2.Enabled = True End If If X1.Visible = True And X5.Visible

  2. Influential Factors in Choosing a Programming Language

    A lot of resources are spent before the first line of code is even written to make sure that the language and IDE we choose will be the most suitable and acceptably reliable, because choosing an "unreliable solution means more money spent in maintenance costs."

  1. Computer Architecture

    0 means no switch or light is active. The first line of inputs for this study will always be A4,A3,A2,A1 The second line of inputs for this study will always be B4,B3,B2,B1 these two numbers will be added together Then it is a long underscore followed by Carrys C3,C2,C1 directly

  2. Excel Coursework - Engineering Hours Accounting System.

    * Allow Mr. Salomon to create reports (with graphs) from entered data. * Include a template for Mr. Salomon to reset the system at the start of the year. * Provide Mr. Salomon with a User Guide designed to assist novice users when they are using the solution. * Accurately calculate the total hours for each employee per week, accurate to each quarter hour.

  1. The Data Management Structure: Components and the data structure

    In recent years however, these tools have been found to be lacking. One reason is that the traditional query and reporting methods do not allow users to discover the underlying relationships of the different pieces of data. Now a new bread of database applications has emerged to fill the need for more powerful data analyzing tools.

  2. Computer Aided Design Package

    One of the benefits of a system that uses TurboCAD is that it is not the cheapest or the most expensive system that could be used but a mid ranged system which has some of the more advanced aspects of the expensive solution while still staying reasonably cheap.

  1. Data Modelling & Data Structures.

    show this could be a record of an accounts file, which contains four fields. Illustrated below is a diagram showing this. ACCOUNT NAME ADDRESS BALANCE 9783 - 59 -812 JOE BLOGGS BLOGGS AVENUE 1000.89 Files: Logical is referred to as the external view of the file a logical file is nothing more than a collection of all logical data.

  2. I have been given the task to design a database for a company called ...

    The reason that the contact number is a text data type and not a numeric type is because a numeric field would not allow a leading zero where as a text type will. Every table must have a key field, a key field is a field, which is a unique number field, which is used as an index.

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