Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.help > #2955

Re: core java coding.. pls help !

From Eric Sosman <esosman@comcast-dot-net.invalid>
Newsgroups comp.lang.java.help
Subject Re: core java coding.. pls help !
Date 2014-05-14 14:32 -0400
Organization A noiseless patient Spider
Message-ID <ll0cri$b85$1@dont-email.me> (permalink)
References <54e9c913-a553-4faa-be8d-9f483f4bca34@googlegroups.com>

Show all headers | View raw


On 5/14/2014 2:07 PM, Riya wrote:
> please help me to code in java..
> my project is related to cloudsim, where i am also using core java to code.
> Its mainly related to virtual machines(vm) and cloudlets/tasks, so each vm
> will be given a set of cloudlet and it has to execute.Now i have to find
> out how much each vm will cost if i assign particular amount to each one of
> them.
>
> I want to create two array which are 2 Dimensional.
> 1st array should contain "vm id"(1,2,3) and its "mips"(random values viz
> 50,100,150).
> 2nd array must have mips from 1st array and it should hold cost ( random
> value say 500, 1000, 1500).

     It sounds like your instructor is an old-line FORTRAN programmer:
Who else would use two-dimensional arrays for this sort of thing?  But,
okay, "A Real Programmer can write FORTRAN in any language," so:

	int[][] array1 = { {1, 50}, {2, 100}, {3, 150}, };
	int[][] array2 = { {1, 500}, {2, 1000}, {3, 1500}, };

-- 
Eric Sosman
esosman@comcast-dot-net.invalid

Back to comp.lang.java.help | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

core java coding.. pls help ! Riya <riyaachar01@gmail.com> - 2014-05-14 11:07 -0700
  Re: core java coding.. pls help ! Eric Sosman <esosman@comcast-dot-net.invalid> - 2014-05-14 14:32 -0400
    Re: core java coding.. pls help ! rossum <rossum48@coldmail.com> - 2014-05-15 16:44 +0100
  Re: core java coding.. pls help ! Roedy Green <see_website@mindprod.com.invalid> - 2014-06-22 10:46 -0700

csiph-web