首页 > 编程语言 >RBE104TC C/C++ Programming Language

RBE104TC C/C++ Programming Language

时间:2024-10-15 11:02:48浏览次数:9  
标签:code Language source Programming number should RBE104TC report your

RBE104TC C/C++ Programming Language Assignment 1

Contribution to the Overall Marks30%Issue DateSubmission Deadline

13th October 2024Assignment Overview:

This assignment is geared towards assessing fundamental coding concepts in C/C++ andinitiating the process of code development using the software development process (SDP)discussed in relevant lectures.In composing the SDP report [in English], we request you to fulfil the following criteria:

  • Design: Clearly explain your understanding of the given problem and specify a sequence ofsteps necessary to accomplish the task (illustrated through flowcharts).
  • Coding Progress: Attach 3-5 screenshots that show the code and running results as evidence,particularly highlighting any errors or situations you believe are valuable to document. Thecorresponding 3-5 versions of the C code should also be saved. All files must clearlydemonstrate the progression of your programming task from the initial stage to the final version.
  • Analysis: Describe the files submitted in the Coding Progress section. Discuss the expectedresults, any encountered or unexpected errors, and your solutions to those issues.
  • Implementation: The C code must be submitted in a separate file. Please specify the filename and provide instructions for user operation.
  • Testing: Describe how you tested and validated your code for required functionalities, aswell as its robustness.Exercise 1 (50%): Write ONE C Program to accomplish the following task: Convert a double number to itshexadecimal form.

Constraints:

1). The double number x is located between 0 and 1000 (0 <= x < =1000), e.g. 678.345;2). The double number with the hexadecimal form contains 6 significant digits. e.g. Thehexadecimal form of “678.345” is “2A6.5851EB”;3). The double number with the hexadecimal form is represented by a string (or a character

array), e.g. “2A6.5851EB”.4). If illegal user input is detected, the software should be capable of informing the user and

enabling re-input to meet the software robustness requirement;

Advice:

It is strongly suggested that you should read the relevant lecture notes on the Learning Mall

before you write down your own codes. The note will help you design a correct program,

especially the design of loop structures and the usage of the arrays.

The possible steps are as follows:

1). Split a double number into the integer part and the fractional part;

2). Convert the integer part into its hexadecimal form;

3). Convert the fractional part into its hexadecimal form;

4). Combine both parts into a string;Exercise 2 (50%): Write a C program that can perform the following operations:

  • Read the following from the keyboard and store them in appropriate variables:
  • A full name (e.g. John Smith);
  • A telephone number (e.g. 12345678900) assume all phone numbers are with 11 digits;
  • A 2-digit decimal number as the Patient ID (e.g. 45);
  • A temperature in degrees Celsius (e.g. 36.5°C), which should be within the range of 34.0°C to 44.0°C.
  • A height in centimeters (e.g. 177cm), which should be within the range of 140cm to230cm, with an accuracy of 1cm.
  • A weight in kilograms (e.g. 85.0kg), which should be 代 写RBE104TC C/C++ Programming Languagewithin the range of 40.0kg to140.0kg.
  • Print the patient's ID on the screen in decimal, octal, and hexadecimal formats (e.g., 45,55, 2D);
  • Convert the temperature from degrees Celsius to degrees Fahrenheit and degrees Kelvin,store the values in appropriate variables rounded to the nearest whole number, and printthem on the screen (e.g., 10°C, 50°F, 283K);
  • Determine if the patient is sick based on their temperature (temperatures higher than37.2°C or lower than 36.0°C will be considered sick);
  • Calculate the patient's BMI (Body Mass Index) and determine if they are severelyoverweight, overweight, normal, underweight, or severely underweight;
  • Print a conclusion, for example: "The patient's name is John Smith, his phone number is 12345678900, his patient ID is 45. His current temperature is 36.5°C, not sick. His height

is 177mm, weight is 85.0kg. He is overweight." If illegal user input is detected, the software should be capable of informing the user and

enabling re-input to meet the software robustness requirement;Hint:The BMI formula is:The BMI Categorization is:Less than 16Severely UnderweightBetween 16 and 18.5UnderweightBetween 18.5 and 25NormalBetween 25 and 30

OverweightLarge than 30

Severely OverweightWhat should be submitted?

  • You should submit the followings two:
  1. A concise report (with text spanning a few pages) accompanied by C source codes. Thisreport should delve into the specifics for each question:- Detail SDP steps 1 to 3 within the report (Design + Coding Progress + Analysis),accounting for 30% of the evaluation.- Encompass SDP step 4 (Implementation + Robustness) with your source code. Your codeshould correspond with the final screenshot provided in the Coding Progress section andinclude appropriate comments. Implementation contributes 35% while Robustness adds5%. Elaborate on SDP step 5 (Testing), elucidating how you validated the correctness,

obustness, and thoroughness of your codes. Employ screenshots and ample explanationsas verification, encompassing 20% of the evaluation. The overall quality of the report accounts for 10% of the evaluation.

  1. All C/C++ source code files, including files from different stages corresponding to thescreenshots.
  • For a comprehensive grading scheme, please consult the Marking Guidelines available onthe Learning Mall system.
  • The report must be saved in PDF format. Place the report in the same folder with source code

files and compress the folder into a single zipped file. Your final submission should include:

- Zipped file containing:

- The report- The source codes

  • The naming convention for the submitted Report and source code files should adhere to thesubsequent format:

- StudentID_LastName_FirstName_AssignmentID.pdf

- StudentID_AssignmentNumber_ExerciseID_SSScreenShotNumber.c/cpp- StudentID_LastName_FirstName_AssignmentID.zip

As an illustration:

The report and C source files would be placed in the same folder as follows:The folder would be compressed to the ultimate zipped submission file, and it would be named: • 1234567_Albert_Einstein_1.zip

How the work should be submitted?

Submission should take place electronically through the Learning Mall system, enabling us toexecute your software during the assessment. Additionally, feedback will be provided via thesame Learning Mall system.

标签:code,Language,source,Programming,number,should,RBE104TC,report,your
From: https://www.cnblogs.com/comp9313/p/18464311

相关文章

  • Panasonic Programming Contest 2024(AtCoder Beginner Contest 375)
    PanasonicProgrammingContest2024(AtCoderBeginnerContest375)\(A\)Seats\(AC\)基础字符串。点击查看代码intmain(){intn,ans=0,i;strings;cin>>n>>s;for(i=0;i<n;i++){ans+=(s[i]=='#'&&s[i......
  • Spatial-Temporal Large Language Model for Traffic Prediction
    1.输入数据这符合时间序列预测的典型设置:输入数据包含多个特征(如历史的流量、天气、时间等),这些特征用于帮助模型进行预测。输出数据则通常是要预测的目标变量,比如未来某个时间步的流量或温度,这个目标变量是一个单一的值,因此输出通道数是1。x_train包含多个特征(3个通道),作......
  • KEYENCE Programming Contest 2024(AtCoder Beginner Contest 374)E题
    六年级蒟蒻来题解了!!!题目大意:给定你一个n,表示有n个生产线,每一个生产线都有两种机器,第i个生产线第一件产品每天可以造Ai件零件但是得付出Pi元的代价,第二件产品每天可以生产Bi件物品但是得付出Qi元的代价,然后给你x元的预算问你所有流水线中的最小值的最大值是多少?思路:首先我们......
  • ENG2002 Computer Programming Homework
    THEHONGKONGPOLYTECHNICUNIVERSITYENG2002ComputerProgrammingHomeworkInstructionsAtthebeginningofeachPythonfile,addacommenttoshowyourstudentIDandname.Thisassignmentcomprises3parts.Youmayuseanewfileforeachpartor......
  • 2023 Benelux Algorithm Programming Contest (BAPC 23)
    A-\texttt题意\(n\)个软件包,已知大小,可以同时下载\(k\)个,已经下载好了\(m\)个,选\(k\)个下载使得下载完后进度最大,输出已完成进度所占百分比。思路选最大的\(m+k\)个。代码点击查看代码#include<bits/stdc++.h>usingnamespacestd;#defineintlonglongvoid......
  • The 2022 ICPC Asia Hangzhou Regional Programming Contest K. Master of Both
    题目链接题意:给定n个字符串,然后给定q种字典序规则,在这q种字典序规则下求出这n个字符串的逆序对数量。思路:我们发现q很大,对于每一种排序规则都遍历一遍n个字符串去求逆序对的数量复杂度太高,所以考虑预处理。我们知道要判断两个字符串字典序的大小关系,只需要知道它们第......
  • 《Programming from the Ground Up》读后感
    之所以看这本书,是想了解一些跟汇编相关的知识,打开这本书后就被作者的观点——“Ifyoudon'tunderstandsomethingthefirsttime,rereadit.Ifyoustilldon'tunderstandit,itissometimesbesttotakeitbyfaithandcomebacktoitlater(第一遍看不懂,那就看第二......
  • 《Programming from the Ground Up》阅读笔记:p217-p238
    《ProgrammingfromtheGroundUp》学习第11天,p217-p238总结,总计22页。一、技术总结1.Ccompilingp216,Ccompilingissplitintotwostages-thepreprocessorandthemaincompiler。注:感觉这个写法不好,因为preprocessor和compiler都是对象,这里应该指动作。应该是:Cco......
  • PatentGPT: A Large Language Model for Patent Drafting Using Knowledgebased Fine-
    本文是LLM系列文章,针对《PatentGPT:ALargeLanguageModelforPatentDraftingUsingKnowledgebasedFine-tuningMethod》的翻译。PatentGPT:一种使用基于知识的微调方法进行专利起草的大型语言模型摘要1引言2相关工作3提出的方法4实验5基准测试6总结......
  • Vision-Language and Large Language Model Performance in Gastroenterology: GPT, C
    本文是LLM系列文章,针对《Vision-LanguageandLargeLanguageModelPerformanceinGastroenterology:GPT,Claude,Llama,Phi,Mistral,Gemma,andQuantizedModels》的翻译。胃肠病学中的视觉语言和大型语言模型表现:GPT、Claude、Llama、Phi、Mistral、Gemma和量......