C#(.NET)面试题:做一个能自定义输入命令的表格程序
目前为止,已经面试?? 这个试题面试的公司是某一上市公司。 试题是英文的(后面给出翻译): you're given a task of writing a simple program where an and user will be able performing some basic spreadsheet operation(i.e. sum) in a nutshell,the program should work as follows:
您可以编写一个简单的程序,其中一个和用户可以执行一些基本的电子表格操作(即SUM)。 简而言之,程序的工作方式如下
? you can write a console or browser application that will pro vide the interactive user experience in c# or javascript,mentioned in the problem statement you can consider your choice of testing framework assume each cell will allocate at most 3 characters,thus numbers given here should be right justified accordingly please provide a read me document or text file,along with the submitted code,detailing instruction of running the application and tests,design considerations etc the code is required to be hosted in apeivate repository in bitbucket. Bitbucket allows user create free private respositories 您可以编写一个控制台或浏览器应用程序,以提供C# 或javascript中提到的交互式用户体验 您可以考虑选择测试框架 假设每个单元格最多分配3个字符,因此此处给出的数字应相应地右对齐。 请提供一份自述文件或文本文件,连同提交的代码、运行应用程序和测试的详细说明、设计注意事项等。 代码需要托管在BitBucket中的Apeivate存储库中。BitBucket允许用户创建免费的私人呼吸 ? besides the code quality,we'll also check how you commit code(i.e. frequency,quality of commit comment,quality unit of code being committed etc) the following assessment criteria's will be considered on the submitted code: code quality(whether its following best practices with regard to design principles,patterns,algorithms) if the program is validating user data,and considering edge cases is the program is tested accordingly 除了代码质量,我们还将检查您如何提交代码(即频率、提交注释的质量、提交的代码的质量单位等) 提交的代码将考虑以下评估标准: 代码质量(是否遵循设计原则、模式、算法方面的最佳实践) 如果程序正在验证用户数据,并考虑边缘情况 程序是否被相应地测试 - - - - - - - - - 就是说设计一个程序,使程序能够捕获用户输入,并且能够创建表格、处理单元格内容。当然这不是指Excel表格。 要求是:
我实现的程序如下(gif动图) 有效控制和正确识别指令 项目地址: https://github.com/whuanle/GenerateTable 笔者项目上传的 ReadMe.MD 文件是英文的,翻译一下就好。主要问题也在文章这里说明了。 项目使用了 StyleCop.Analyzers 代码质量审查工具,对程序的代码质量进行审查。 无论你怎么输入,不会因为你的错误指令使程序崩溃。 使用高内聚、低耦合的思路进行设计,避免函数式、If/else式编程。 ? 要求: VS 2017 .Net Core (最新 2.2,可支持不同版本) ? (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |