美文网首页
代做Lab Exercises 语言程序、JSP编程作业代写留学

代做Lab Exercises 语言程序、JSP编程作业代写留学

作者: xsc5773 | 来源:发表于2019-04-26 16:53 被阅读0次

    (60-141) Lab Exercises #2 (Due at the end of the lab period – July 9-11, 2018) Objectives: Working with arrays and functions Pre-requisite(s): Read and review chapters 1-6. Write a C program that creates an array of 500 integer elements and loads it with each value equal to the subscript’s square, and then write a sequential and a binary search algorithm to see whether a number is a perfect square. Use a loop to load the array. Prompt the user for a positive integer value less than 250,000. Test the functions by calling them from a simple interactive main() function using a menu, with different values used to select the choice of function. Overall, you should have one C program (call it firstnameLastname_Lab2.c) containing one main() function and at least the following functions: 1- void loadArray(int nums[], int size): To load the array nums with its subscript’s squares (eg. {0,1,4,9,16,25,… }) 2- int binarySearch(int nums[], int size, int key): To search the input array for a key using binary search approach and return the number of comparisons. 3- int sequentialSearch(int nums[], int size, int key): To search the input array for a key using sequential search approach and return the number of comparisons. 4- int getKey(): to get a valid integer key (between 0 and 250,000) from the user to search. The program should contain a loop that permits users to enter a new choice of function for each loop, until exit from the loop explicitly. Sample Interaction Lab 2 ----- 1 – Sequential Search 2 – Binary Search 0 - QUIT Please enter a selection: 4 Invalid Input. Lab 2 ----- 1 – Sequential Search 2 – Binary Search 0 - QUIT Please enter a selection: 1 Please enter a positive number to search (Invalid Input. Lab 2 ----- 1 – Sequential Search 2 – Binary Search 0 - QUIT Please enter a selection: 1 Please enter a positive number to search (1500 is not a perfect square. Number of comparison using sequential search is 500. Lab 2 ----- 1 – Sequential Search 2 – Binary Search 0 - QUIT Please enter a selection: 2 Please enter a positive number to search (1600 is a perfect square. Number of comparison using binary search is 9. Lab 2 ----- 1 – Sequential Search 2 – Binary Search 0 - QUIT Please enter a selection: 0 Goodbye! EVALUATION OF WORK AND ATTENDANCE: Total 25 marks. You need to show to your lab instructor the work you have completed for this lab assignment, generally in the form. of a working program. The marks you will receive for the lab are made of two parts, the programming part (20 marks) and lab attendance (5 marks). Do not email your work to the Instructor or to any teaching assistant. Lab Work Mark: Your C code will be evaluated based on your solutions for the problems based on the following scheme: 1. Does the code run and meet specifications?  Is input adequate and input data type properly validated? Is processing adequate? Is output correct and adequate? Is the code compliable? Is the code run properly? 2. Is the code properly commented?  Is the program title, programmers first and last name, and the date posted at the top in a multi-line comment? Is each significant step of the program properly commented? Are comments added to clarify details? Are comments clear, accurate, neatly formatted, and have no misspellings? 3. Is the code properly formatted?  Are blocks of code indented according to their parent-child relationship? Do curly braces line up vertically? Is there an empty line between significant steps (blocks) of the program? Is camel-case notation used for variable, e.g. employeeLastName? IMPORTANT: ASK QUESTIONS IF YOU GET STUCK, BUT DO YOUR OWN CODE. ANY CODE SUSPECTED TO BE SIMILAR TO ANOTHER SUBMISSION WILL CAUSE BOTH SUBMISSIONS TO RECEIVE A ZERO MARK ON ALL LABS AND BE REPORTED FOR PLAGIARISM. 本团队核心人员组成主要包括BAT一线工程师,精通德英语!我们主要业务范围是代做编程大作业、课程设计等等。我们的方向领域:window编程 数值算法 AI人工智能 金融统计 计量分析 大数据 网络编程 WEB编程 通讯编程 游戏编程多媒体linux 外挂编程 程序API图像处理 嵌入式/单片机 数据库编程 控制台 进程与线程 网络安全 汇编语言 硬件编程 软件设计 工程标准规等。其中代写编程、代写程序、代写留学生程序作业语言或工具包括但不限于以下范围:C/C++/C#代写Java代写IT代写Python代写辅导编程作业Matlab代写Haskell代写Processing代写Linux环境搭建Rust代写Data Structure Assginment 数据结构代写MIPS代写Machine Learning 作业 代写Oracle/SQL/PostgreSQL/Pig 数据库代写/代做/辅导Web开发、网站开发、网站作业ASP.NET网站开发Finance Insurace Statistics统计、回归、迭代Prolog代写Computer Computational method代做因为专业,所以值得信赖。如有需要,请加QQ:99515681 或邮箱:99515681@qq.com 微信:codehelp

    相关文章

      网友评论

          本文标题:代做Lab Exercises 语言程序、JSP编程作业代写留学

          本文链接:https://www.haomeiwen.com/subject/hteqnqtx.html