Challenge 47 – Tuples of Fun
To perform effectively as a software application developer, one must be acquainted with various facets of application development. To test the skills of application developers, Superior Consulting Services (SCS) offers a series of technical coding challenges designed to challenge and educate application developers. This blog addresses problem solving and algorithm development, and presents SCS’ forty seventh (47th) challenge: Tuples of Fun
Let’s get ready to rumble
Each SCS challenge will require the user to solve a problem. All questions are designed to be solvable by mid-level application developers in one hour or less. The 47th challenge is shown below.
The Tuple<T> class was introduced in .NET Framework 4.0. A tuple is a data structure that contains a sequence of elements of different data types. It can be used where you want to have a data structure to hold an object with properties, but you don’t want to create a separate type for it.
Tuple<T1, T2, T3, T4, T5, T6, T7, TRest>
Create a function that takes in Tuple representation of an object that contains the following information:
And returns a string formatted as XML or JSON dependent upon the value of ConvertToXml.
The prototype for the function follows:
- Write a function that will take a Tuple representation of the object discussed above.
- Return a valid Xml or Json formatted string based upon the value of ConvertToXml parameter.
- Contestant challenge submittals should be emailed to email@example.com, Subject Line SCS Coding Challenge #47.
- Reponses to Challenge #47 should be received by 5:00 pm CDT, February 28th, 2019.
- In the event of a tie between two or more winning solutions, the first solution received will receive the prize; however, all submitters with good solutions will be recognized.
- Employees of SCS are not eligible to participate in the coding challenge.
The best solution submitted will receive an Amazon.com gift certificate worth $25.00 (U.S. dollars) and have the winning solution, along with the winner’s name, on the SCS website: www.teamscs.com.