某外企mono for android试题

简介: Hitcents C#Programming Test   This test is designed to evaluate generalC# and Xamarin development skills.

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 fromQuestion 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 isnot 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 andQuestion 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.

 


相关文章
|
28天前
|
缓存 搜索推荐 Android开发
安卓开发中的自定义控件实践
【10月更文挑战第4天】在安卓开发的海洋中,自定义控件是那片璀璨的星辰。它不仅让应用界面设计变得丰富多彩,还提升了用户体验。本文将带你探索自定义控件的核心概念、实现过程以及优化技巧,让你的应用在众多竞争者中脱颖而出。
|
28天前
|
Java Android开发 Swift
安卓与iOS开发对比:平台选择对项目成功的影响
【10月更文挑战第4天】在移动应用开发的世界中,选择合适的平台是至关重要的。本文将深入探讨安卓和iOS两大主流平台的开发环境、用户基础、市场份额和开发成本等方面的差异,并分析这些差异如何影响项目的最终成果。通过比较这两个平台的优势与挑战,开发者可以更好地决定哪个平台更适合他们的项目需求。
97 1
|
5天前
|
编解码 Java Android开发
通义灵码:在安卓开发中提升工作效率的真实应用案例
本文介绍了通义灵码在安卓开发中的应用。作为一名97年的聋人开发者,我在2024年Google Gemma竞赛中获得了冠军,拿下了很多项目竞赛奖励,通义灵码成为我的得力助手。文章详细展示了如何安装通义灵码插件,并通过多个实例说明其在适配国际语言、多种分辨率、业务逻辑开发和编程语言转换等方面的应用,显著提高了开发效率和准确性。
|
3天前
|
Android开发 开发者 UED
安卓开发中自定义View的实现与性能优化
【10月更文挑战第28天】在安卓开发领域,自定义View是提升应用界面独特性和用户体验的重要手段。本文将深入探讨如何高效地创建和管理自定义View,以及如何通过代码和性能调优来确保流畅的交互体验。我们将一起学习自定义View的生命周期、绘图基础和事件处理,进而探索内存和布局优化技巧,最终实现既美观又高效的安卓界面。
15 5
|
2天前
|
JSON Java Android开发
探索安卓开发之旅:打造你的第一个天气应用
【10月更文挑战第30天】在这个数字时代,掌握移动应用开发技能无疑是进入IT行业的敲门砖。本文将引导你开启安卓开发的奇妙之旅,通过构建一个简易的天气应用来实践你的编程技能。无论你是初学者还是有一定经验的开发者,这篇文章都将成为你宝贵的学习资源。我们将一步步地深入到安卓开发的世界中,从搭建开发环境到实现核心功能,每个环节都充满了发现和创造的乐趣。让我们开始吧,一起在代码的海洋中航行!
|
3天前
|
缓存 数据库 Android开发
安卓开发中的性能优化技巧
【10月更文挑战第29天】在移动应用的海洋中,性能是船只能否破浪前行的关键。本文将深入探讨安卓开发中的性能优化策略,从代码层面到系统层面,揭示如何让应用运行得更快、更流畅。我们将以实际案例和最佳实践为灯塔,引领开发者避开性能瓶颈的暗礁。
11 3
|
6天前
|
存储 IDE 开发工具
探索Android开发之旅:从新手到专家
【10月更文挑战第26天】在这篇文章中,我们将一起踏上一段激动人心的旅程,探索如何在Android平台上从零开始,最终成为一名熟练的开发者。通过简单易懂的语言和实际代码示例,本文将引导你了解Android开发的基础知识、关键概念以及如何实现一个基本的应用程序。无论你是编程新手还是希望扩展你的技术栈,这篇文章都将为你提供价值和启发。让我们开始吧!
|
29天前
|
Web App开发 安全 程序员
FFmpeg开发笔记(五十五)寒冬里的安卓程序员可进阶修炼的几种姿势
多年的互联网寒冬在今年尤为凛冽,坚守安卓开发愈发不易。面对是否转行或学习新技术的迷茫,安卓程序员可从三个方向进阶:1)钻研谷歌新技术,如Kotlin、Flutter、Jetpack等;2)拓展新功能应用,掌握Socket、OpenGL、WebRTC等专业领域技能;3)结合其他行业,如汽车、游戏、安全等,拓宽职业道路。这三个方向各有学习难度和保饭碗指数,助你在安卓开发领域持续成长。
58 1
FFmpeg开发笔记(五十五)寒冬里的安卓程序员可进阶修炼的几种姿势
|
11天前
|
Java API Android开发
安卓应用程序开发的新手指南:从零开始构建你的第一个应用
【10月更文挑战第20天】在这个数字技术不断进步的时代,掌握移动应用开发技能无疑打开了一扇通往创新世界的大门。对于初学者来说,了解并学习如何从无到有构建一个安卓应用是至关重要的第一步。本文将为你提供一份详尽的入门指南,帮助你理解安卓开发的基础知识,并通过实际示例引导你完成第一个简单的应用项目。无论你是编程新手还是希望扩展你的技能集,这份指南都将是你宝贵的资源。
39 5