Click here to Skip to main content
15,892,517 members
Please Sign up or sign in to vote.
1.00/5 (4 votes)
See more:
Requirements Overview
We require you to write a "C# Console Application" for a basic Customer Relationship Manager (CRM) application.
As Pinewood write software that is used for Dealership Management in the Automotive industry, this CRM will be targeted towards this scenario.
Requirements Analysis
You have been provided with a text document containing customer and vehicle information. This document will need to be imported into the application, processed and then stored in such a way that various reports can be run on this data.
Data
Customer Information
•	Forename
•	Surname
•	Date of Birth
Vehicle Information
•	Manufacturer
•	Model
•	Registration number
•	Registration date
•	Engine size (in cc)
•	Owner
•	InteriorColour (Car only)
•	Has Helmet Storage (Motorcycle only)
Required Relationships
•	Customers can have 1 to many vehicles.
•	Vehicle must have exactly one owner.
•	Vehicle type cannot be changed once it is created.
Reports
•	We will require reports to be designed to contain:
o	All known customers and any vehicles they own.
o	All customers between the age of 20 and 30.
o	All Vehicles registered before 1st January 2010.
o	All Vehicles with an engine size over 1100.
Expected demonstrable skills
•	Good understanding of C#.
•	Good understanding of Object Orientated (OO) principles.
•	Good understanding of relational data principles.
•	Reusable code – low coupling, high cohesion.


What I have tried:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.IO;
namespace Graduate_Test_Brief
{
    class Program
    {
        
        static void Main(string[] args)
        {
            Console.Write(string.Join(" ", GetReport("Joe", @"..\..\Assets\Customer Information.csv", 1)));
            Console.Read();
        }

        public static string[] GetReport(string data, string filePath, int coloumn)
        {
            string[] reportNotFound = { "Report Not Found" };
            try
            {
                string[] lines = File.ReadAllLines(@"..\..\Assets\Customer Information.csv");//File.ReadAllText(@"..\..\Assets\Customer Information.csv");
                for (int i = 0; i < lines.Length; i++)
                {
                    string[] fields = lines[i].Split(',');
                    if (fields[coloumn].Equals(data))
                    {
                        Console.WriteLine("Report Found");
                      
                        return fields;
                    }
                }
                return reportNotFound;

            }
            catch (Exception e)
            {
                Console.WriteLine("File Could Not Be Found");
                Console.WriteLine(e.Message);
                return reportNotFound;
            }
        }
    }
}
Posted
Updated 14-Aug-19 8:45am
Comments
ZurdoDev 14-Aug-19 13:40pm    
And now you must ask a question.
Member 14559183 14-Aug-19 13:50pm    
hi,
have a look at the reports i just need to do that but in this program i can only fetch 1 data while i want to fetch more than 1
Dave Kreskowiak 14-Aug-19 17:08pm    
Ummm....yeah.

I hate to tell you this, but if you can't write this code without help, you're not going to get the job.

The code you have written demonstrates none of the "Expected demonstrable skills".

You've got nothing showing any object oriented principals, no database relations (you don't need a database for that!), no data model at all, and nothing that decouples anything from anything else.

I would strongly suggest two things:

1) Read the requirements carefully. You appear to have missed quite a few of them. Pay particular attention to everything in the "Expected demonstrable skills" section, because as far as I can see you have demonstrated none of them at all in that code. To be brutally honest, your code looks like a week three or four student wrote it, not someone applying for a real job.

2) Don't expect others to bail you out and get a pass on an interview task that you don't; deserve. Remember that it is effectively an exam, so getting others to do it for you is cheating - which isn't fair on you (as you will fail the interview if you got it with our code; isn't fair on those who can do it for themselves; isn't fair on the company (interviewing is expensive). Worse, if you bulled your way through an interview, one of us might have to work with you for the short time you were with the company*, and no-one likes to "carry" coworkers. If you can't do the job, don't apply for it!

* Short because you will be quickly found out, and kicked out at the first opportunity.
 
Share this answer
 
Quote:
We require you to write a “C# Console Application” for a basic Customer Relationship Manager (CRM) application.

In CRM anything is about databases.
The piece of code you show is not even remotely linked to database.
Quote:
This document will need to be imported into the application, processed and then stored in such a way that various reports can be run on this data.

the code is so far away from requirement that the only thing to do is discard and start again from scratch.
 
Share this answer
 
Comments
Member 14559183 14-Aug-19 14:51pm    
I dont have to use the database all the data is provide in CSV file i have to fetch from the data from that and if i have to use the data base then i there is no question to ask because i have use data base lot of time and i know what to do in the database but i never used CSV or excel file before to do this kind of stuff.
Patrice T 14-Aug-19 15:00pm    
How do you plan to show 'Good understanding of relational data principles.'
without databases ?
Member 14559183 14-Aug-19 15:03pm    
Important Considerations before you begin
There are two supported types of vehicle required in this example; cars and motorcycles.
As this is to be produced in a console application, no GUI is expected or required. The data imported from the CSV does not need to be persisted outside of the runtime of the application; no need to create a database.
If you wish to produce a menu system that allows different reports to be run independently then you can but this is not required.
All reports must be either accessed through a menu, or automatically run upon execution of the code.

We expect that this test will last around 2 – 3 hours but you can take longer or shorter if you wish. If you run out of time then please feel free to include notes that detail what you would do next, or what you would have liked to have done given more time.

Good luck.





This are the further lines and i was also shocked that in this one i dont have to use database

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900