Purchase Solution

Example of How to Implement Array in Java

Not what you're looking for?

Ask Custom Question

If I were to describe an every day situation, like being a chef at a restaurant, how would I implement an array (for inventory) of my spices (I would have a total of 20 spice bottles)? And, how would items in the array might be searched for or sorted?

I don't need a full program, I just need pseudocode - a small example of just the possible array.

Purchase this Solution

Solution Summary

I have in fact coded the whole program for you.

I thought it would be easier for you test and understand the program when you execute the attached class file in a java VM. Feel free to add 10 more spices (I have run out of names:)

Solution Preview

I have in fact coded the whole program for you.

I thought it would be easier for you test and understand the program when you execute the attached class file in a java VM. Feel free to add 10 more spices (I have run out of names:)

Hope it helps. If you like it please leave comment and reserve future problems for me.

public class spice {
public static String [] arrSpice;

/**
* @param args
*/
public static void ...

Purchase this Solution


Free BrainMass Quizzes
Excel Introductory Quiz

This quiz tests your knowledge of basics of MS-Excel.

Word 2010: Table of Contents

Ever wondered where a Table of Contents in a Word document comes from? Maybe you need a refresher on the topic? This quiz will remind you of the keywords and options used when working with a T.O.C. in Word 2010.

Java loops

This quiz checks your knowledge of for and while loops in Java. For and while loops are essential building blocks for all Java programs. Having a solid understanding of these constructs is critical for success in programming Java.

Inserting and deleting in a linked list

This quiz tests your understanding of how to insert and delete elements in a linked list. Understanding of the use of linked lists, and the related performance aspects, is an important fundamental skill of computer science data structures.

C++ Operators

This quiz tests a student's knowledge about C++ operators.