Hitcents C#Programming Test

This test is designed to evaluate generalC# and Xamarin development skills. Prior knowledge of C# or Xamarin tools isnot a requirement, we are really evaluating your skills to learn quickly, use searchengines and StackOverflow, and problem solve—all on your own.

Begin by installing Xamarin.Android andXamarin Studio here: http://xamarin.com/android

The installer will take some time, but willinstall Java, the Android SDK, and everything you need to take this test. Itshould work on a Mac or Windows. After using Xamarin Studio with Androidprojects, you may get a prompt saying you must purchase a license, select theoption to start a 30-day trial.

General Rules:

  • You may use the internet, books, or any other programming-related material.  Open source projects available on Github, CodePlex, etc. are also fine to use to assist you on each question.
  • Points will be deducted for solutions that include poor programming practices, excessive RAM or CPU usage, or could be considered slow and non-optimized.  Likewise, bonus points may be awarded for excellent software design and quick executing code.
  • You may complete any question in any order, although some questions may build onto answers from previous questions.

Question 1 (Sorting data):

  • Create a C# console project in Xamarin Studio. This will just run natively on your desktop.
  • Prompt the user to enter several “words” separated by spaces
  • When the user presses <enter>, sort the words alphabetically
  • Print out the sorted words, and prompt the user for a new set of words
  • The application will continue to prompt for more words, until the user types the word “exit”
  • Make your program user-friendly, your text printed at the console should be nicely formatted and easy to understand

Question 2 (Importing data):

  • Create a C# console project in Xamarin Studio. This will just run natively on your desktop.
  • You are given a large text file containing address data for many different stores in the United States.  Look in “Question 2\Stores.txt”, you may also see the layout of this file described in “Stores.xls”.
  • Create the necessary tables to store the information in SQLite. Use proper data types, primary keys, indexes, etc., as your schema design is taken into account.  Make sure to trim blank spaces out of each column, and handle the possibility of bad data.
  • Create a console application that will load this text file into SQLite, you must load the file and insert each row from C# code.  No import tools or classes can be used, you will have to read the file from C# and parse the data by hand (or via an open source project if desired).  You may use any method you wish to connect to the database.
  • Part of the challenge in this problem is to find an appropriate C# library for working with SQLite and integrate it into your project.
  • Speed is a priority, so make sure the time it takes for the entire file to load is printed in the console window on completion.  Full time format in HH:MM:SS.mmm is preferred.

Question 3 (Importing more data):

  • Create a C# console project in Xamarin Studio. This will just run natively on your desktop.
  • Building onto your existing SQL database, you will have to keep track of order information for each store from Question 2.
  • You will have to parse the Orders.xml file located in the “Question 3” folder.  You may use any method you wish for parsing the xml.  You should not have to worry about malformed xml.
  • An order contains the following:

◦  A GUID as a primary key or ID

◦  The store's ID number

◦  Total Items in the order

◦  Total Cost of the order in USdollars

◦  Up-to a 32 character name of aperson tied to the order

◦  A Yes/No value that says if theorder was a “rush” order.

◦  Date and time of the order

  • Import this xml into a new table in the same database as Question 2, use appropriate data types, as hard disk space needs to be kept at minimum while not affecting rounding, if someone decided to run queries that total the rows in your database they should be able to get accurate answers.
  • Also print out the time it takes for your code to run as you did in Question 2.
  • BONUS: Set up a proper foreign key relationship from your orders to your stores in your database.  If someone ran a query to delete a store, SQLite should automatically delete any orders by that store.  Queries will also be made that lookup orders by order id, customer, and date.  Make indexes to speed up queries in this manner.

Question 4 (Web Requests):

  • Create a C# console project in Xamarin Studio. You can also choose to make a Xamarin.Android app if you prefer.
  • You are trying to discover a password for a login on a website, at the url: https://www.hitcents.com/csharptest.cgi?username=*&password=* (replace the asterisks with the username and password)
  • Luckily the web site is not very secure, and is limited to a 2 letter password that can only contain letters, numbers, or the underscore “_” and you know that a valid username is “john.smith”.  You also know that it is not case sensitive.
  • Make a console application that hits the web page, guessing every combination of passwords for “john.smith”.  Print out the correct password when discovered.  The page will return either “SUCCESS” or “FAIL”.
  • Each web request could potentially fail at a networking level, so make sure you handle the error gracefully and retry the password combination in such cases.
  • To speed up the time it takes for your program to run, make up to 5 or more requests at a time on separate threads, making sure to stop when the password is found.
  • Record the overall time it takes your program to run as in Question 1 and Question 2.

 

Question 5 (Xamarin.Android):

  • Create a Xamarin.Android project in Xamarin Studio.
  • Build a simple Android app using implementing any of the following concepts:

◦  Navigating to differentactivities

◦  Action Bar

◦  Android fragments

◦  ListView and adapters

◦  Using the camera or photolibrary

  • You can build any application you want, choose something to show off your abilities for making native Android apps with Xamarin.

Question6 (Java binding project):

  • Create a Xamarin Java Bindings project in Xamarin Studio.
  • Setup a binding for the China Mobile SDK included with this test. Documentation is also included.
  • Use “Metadata.xml” and rewrite any relevant parameter names, because they default to p0, p1, p2, etc.
  • Setup a sample application to make test purchases through the SDK.

某外企mono for android试题的更多相关文章

  1. 【月入41万】Mono For Android中使用百度地图SDK

    借助于Mono For Android技术,.Net开发者也可以使用自己熟悉的C#语言以及.Net来开发Android应用.由于Mono For Android把Android SDK中绝大部分类库都 ...

  2. Android(1)—Mono For Android 环境搭建及破解

    0.前言 最近公司打算开发一款Android平台的简单报表查询软件,因本人之前一直是.NET开发的,和领导商定之后决定采用Mono For Android 进行开发,暂时采用破解版进行开发: 下文是记 ...

  3. Android(4)—Mono For Android 第一个App应用程序

    0.前言 年前就计划着写这篇博客,总结一下自己做的第一个App,却一直被新项目所累,今天抽空把它写完,记录并回顾一下相关知识点,也为刚学习Mono的同学提供佐证->C#也是开发Android的! ...

  4. mono for android 获取手机照片或拍照并裁剪保存

    axml <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android ...

  5. mono for android Json 上传文件

    void button_Click(object sender, EventArgs e) { string Url = "上传地址,服务器端负责接收"; byte[] fbyte ...

  6. mono for android 用ISharedPreferences 进行状态保持 会话保持 应用程序首选项保存

    由于项目需要 要保持用户登录状态 要进行状态保持 用途就好像asp.net的session一样 登录的时候进行保存 ISharedPreferences shared = GetSharedPrefe ...

  7. mono for android 自定义titleBar Actionbar 顶部导航栏 修改 样式 学习

    以前的我是没有做笔记的习惯的,学习了后觉得自己能记住,但是最近发现很多学的东西都忘记了,所有现在一有新的知识,就记下来吧. 最近又做一个mono for android 的项目 这次调整比较大,上次做 ...

  8. mono for android学习过程系列教程(1)

    直接进入主题,关于mono for android的学习,首先配置好环境,如何配置环境,度娘谷歌一大堆,记得使用破解版. 我自己是百度“黑马四期”传智播客的视频,里面有破解版开发环境的软件. 今天直接 ...

  9. mono for android学习过程系列教程(2)

    接着上一讲继续开始写,今天介绍的是安卓的基本组成结构. 在大多数情况下,MONO FOR ANDROID的命名空间和Android的命名空间 是互相映射的.有时候需要大小写,非字母数字字符的用法以及名 ...

随机推荐

  1. SVM技法

    PLA不管胖瘦,SVM喜欢胖的 fewer dichotomies=> small VC 演算法的VC dimension shatter 掉3个点 如果限制胖瘦,两个点都shatter不掉 喜 ...

  2. 24种设计模式--门面模式【Facade Pattern】

    大家都写过纸质的信件吧,比如给女朋友写情书什么的,写信的过程大家都还记得吧,先写信的内容,然后写信封,把信放到信封中,封好,投递到信箱中进行邮递,这个过程还是比较简单的,虽然简单,这四个步骤都是要跑的 ...

  3. python 计算apache进程占用的内存大小以及占物理内存的比例

      目的:计算所有apache进程占用的内存大小以及占物理内存的比例: 思路:利用系统中/proc/meminfo的现有数据进行统计 1.pidof列出服务对应进程的PID [root@yanglih ...

  4. 我学C的那些年[ch02]:宏,结构体,typedef

    c语言的编译过程: 预处理 编译 汇编 链接 而预处理中有三种情况: 文件包含( #include ) 条件编译(#if,#ifndef,#endif) 宏定义( #define ) 宏就是预处理中的 ...

  5. C#事件(Event)学习日记

    event 关键字的来由,为了简化自定义方法的构建来为委托调用列表增加和删除方法. 在编译器处理 event 关键字的时候,它会自动提供注册和注销方法以及任何必要的委托类型成员变量. 这些委托成员变量 ...

  6. 十六进制字符串转化为byte数组

    工作上有这样的需求之前找了好多都不行,好不容易有个可以的赶紧留下来. 原址:http://blog.163.com/roadwalker@126/blog/static/113561841201013 ...

  7. Contest20140710 sequence

    sequence|sequence.in|sequence.out 题目描述: 给定一个整数K和长为N的数列{Ai},求有多少个子串(不含空串)的和为K的倍数.(在这里子串表示{A[i]..A[j]} ...

  8. [BZOJ 1047] [HAOI2007] 理想的正方形 【单调队列】

    题目链接:BZOJ - 1047 题目分析 使用单调队列在 O(n^2) 的时间内求出每个 n * n 正方形的最大值,最小值.然后就可以直接统计答案了. 横向有 a 个单调队列(代码中是 Q[1] ...

  9. MVC自学系列之一(MVC入门篇)

      MVC是如何适用于ASP.NET中的 自从2002年ASP.NET 1.0版本的首次发布,就知道ASP.NET和Web Forms是同样一回事.ASP.NET由抽象两层类所支持: -->Sy ...

  10. Spring REST

    前面介绍过Spring的MVC结合不同的view显示不同的数据,如:结合json的 view显示json.结合xml的view显示xml文档.那么这些数据除了在WebBrowser中用JavaScri ...