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


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

Re: core java coding.. pls help !

From rossum <rossum48@coldmail.com>
Newsgroups comp.lang.java.help
Subject Re: core java coding.. pls help !
Date 2014-05-15 16:44 +0100
Message-ID <1vn9n9lqpj91vtm5lk7auv21t7d89bjgja@4ax.com> (permalink)
References <54e9c913-a553-4faa-be8d-9f483f4bca34@googlegroups.com> <ll0cri$b85$1@dont-email.me>

Show all headers | View raw


On Wed, 14 May 2014 14:32:14 -0400, Eric Sosman
<esosman@comcast-dot-net.invalid> wrote:

>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}, };
Nah...  *Real* FORTRAN uses the FORTRAN naming conventions:

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

All integer variables start with the letters i .. n.  Short
meaningless names are real FORTRAN as well.

rossum (who prefers Algol to FORTRAN)

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


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