Help me please, that's really important and urgent
RaptorKiller42
Messages postés5Date d'inscriptionsamedi 6 février 2010StatutMembreDernière intervention12 mars 2010
-
11 mars 2010 à 20:34
RaptorKiller42
Messages postés5Date d'inscriptionsamedi 6 février 2010StatutMembreDernière intervention12 mars 2010
-
12 mars 2010 à 12:15
Hello, I have a test that I have to complete for tomorrow.
I'm not really experienced but I need to pass this test to get a job, that's really important since I'm unemployed. Many thanks in advance.
The problem is:
Review the C# module rainbow.cs and comment on:
1. Design errors
2. Implementation errors
3. Limitations on use
4. Possible improvements
5. Possible alternative designs
/// <Description>
/// Rainbow class to handle rainbow colours.
/// </Description>
/// <Comment>
/// Derived from rainbow.c
/// </Comment>
/// T Jones
/// </File header>
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Rainbow
{
class Rainbow
{
// Colour indicies
public const uint RED = 1;
public const uint ORANGE = 2;
public const uint YELLOW = 3;
public const uint GREEN = 4;
public const uint BLUE = 5;
public const uint INDIGO = 6;
public const uint VIOLET = 7;
// Colour strings
public const string RED_STR = "red";
public const string ORANGE_STR = "orange";
public const string YELLOW_STR = "yellow";
public const string GREEN_STR = "green";
public const string BLUE_STR = "blue";
public const string INDIGO_STR = "indigo";
public const string VIOLET_STR = "violet";
private struct Colours
{
public int[] Cols;
public string[] ColsStr;
}
private Colours colours;
/// <summary>
/// Create a Rainbow.
/// </summary>
public Rainbow()
{
colours.Cols = new int[7];
colours.ColsStr = new string[7];
krimog
Messages postés1860Date d'inscriptionlundi 28 novembre 2005StatutMembreDernière intervention14 février 201548 12 mars 2010 à 09:59
Do you really think that asking other people to make your work is a good idea ? Is that what you're gonna do if you get this job ?
You're trying to get a job by lying about what you can do. What will happen when they see you can't program in C# ?
Krimog : while (!(succeed = try())) ; - Nous ne sommes pas des décodeurs ambulants. Le style SMS est prohibé. -
RaptorKiller42
Messages postés5Date d'inscriptionsamedi 6 février 2010StatutMembreDernière intervention12 mars 2010 12 mars 2010 à 10:21
Alright, so to make it a bit more clear, I am good in C++ and Java programming (2years in company) but that's true much less with C#. Anyway it doesn't matter since the job I apply for is UI Design in java, but the test is in C# because as you can see it's more of a design problem research than a compilation problem research. SO in that case, I already have answers to this problem, the reason I put this on a forum is that I need this job and I wanted other opinions from maybe more experienced guys to be sure that what I'm gonna give to this company is perfect... And you know as well as I do that once you have the job, even if they're some stuff you don't know how to do and you're not an expert, there is always a way around to handle it.
So please, instead of spending time to judge me, could you please just help me if you're so good.
Thank you.
Best regards,
-RaptorKiller
Vous n’avez pas trouvé la réponse que vous recherchez ?
krimog
Messages postés1860Date d'inscriptionlundi 28 novembre 2005StatutMembreDernière intervention14 février 201548 12 mars 2010 à 11:59
@ before a string is a way to avoid special chars with \. If you want to write ", you have to double it
If fact,
@"rainbow.GetColour(""black""): "
is the same thing as
"rainbow.GetColour("black"): "
This way of writing strings is really efficient for paths
"C:\\Documents and Settings\\Login\\My Documents\\My Pictures"
=>
@"C:\Documents and Settings\Login\My Documents\My Pictures"
Krimog : while (!(succeed = try())) ; - Nous ne sommes pas des décodeurs ambulants. Le style SMS est prohibé. -