Reference no: EM132479461
Programming Skills Test Assignment -
1. Introduction - With the programming skills test, we will assess your knowledge and experience in the environments that you will work in: C#, .NET and Microsoft SQL Server.
You can do these tests at home and use any references you like to complete them. Rather than testing your memory and book knowledge, we will confront you with programming challenges that are representative of the kind of work you will encounter when working for Outperform.
The tests are divided into two sections.
i. C# programming
ii. SQL modeling and programming
2 C# Questions - This section contains three C# related questions.
2.1 Mail Merge
Objective: Write a mail merge method that takes a template text file, substitutes specially marked up text blocks with data entries from an XML file and writes files with substituted text to an output directory. You are free to include other private implementation methods as needed.
2.2 Sparse Arrays
A sparse array is an array with a lot of elements, most of which have the same value (usually zero). Such an array might have millions of logical elements but only a few hundred that are non-zero.
Objective: Implement a class for sparse arrays of double precision numbers that is optimal in memory requirements as well as in the performance of its methods.
Constructors:
Constructors take the length of the array as an argument and uses 0 as the default value.
Constructor that takes length and a default value.
Properties:
Length: Get the logical length of the array
Indexed properties to get and set the element values.
Methods:
Sum(): returns the logical sum of values;
Average(): returns the logical average of values;
Sort(): sorts the elements of the array in ascending order.
Reverse(): Turns the array upside down. Applying Sort() and then Reverse() is the same as sorting in descending order.
Operators:
Vector addition, such that (a+b)[i] == a[i] + b[i]. Include checks and exceptions for arrays that don't fit each other.
Scalar multiplication by double number, such that (a*x)[i] == a[i] * x.
Include its symmetric counterpart.
3. SQL Questions - This section contains four SQL questions, related to a single use case: A company sells computers on line to end customers. These computers consist of a base model that can be customized with specific parts, such as a faster hard disk, CPU or video controller. Parts may fit into several but not all base models.
An order placed by a customer consists of one or more items; each item has one base model with zero or more custom parts.
3.1 Data Model
Describe a data model for this domain with customers, base models, parts, sales orders and items. Provide each entity with a minimal set of attributes that you would expect in such a model. (See follow-up questions for hints.) You can describe this model in text form or in a diagram. In the latter case, submit your diagram as PNG, JPEG or GIF image.
3.2 Tables and constraints
Provide an implementation of the data model in the form of SQL DDL statements. Include primary and foreign key constraints as well as constraints like "an order item may only contain parts that fit in its base model", using the most appropriate DDL constructions.
3.3 Total Recall
The company detects that a particular part has a defect and decides to replace that part for free for all customers that recently ordered a model with that custom part.
Write a SQL query that returns a list of all customers that placed such an order in the past three months, with their name and address and for each customer; the number of items ordered with that part; and the total sales price for those items (including the price of the base model, the defective part and any other custom parts).
3.4 Loyalty Bonus
The company decides to reimburse a purchased item to their most loyal customers every month.
Write a SQL query that lists, for each month of the past twelve months, the customer who ordered the most that month (in amount of money spent); together with the order and item number of the cheapest item they bought that month.
Attachment:- Programming Skills Test Assignment File.rar