首页
网站开发
桌面应用
管理软件
微信开发
App开发
嵌入式软件
工具软件
数据采集与分析
其他
首页
>
> 详细
SEHH2042代做、代写C++编程设计
项目预算:
开发周期:
发布时间:
要求地区:
SEHH2042 23/24 Semester Two – Individual Assignment 1 Page 1
SEHH2042 Computer Programming
Individual Assignment 1
Submission deadline: 23:59, 13 Mar 2024 (Wednesday)
Expected Learning Outcomes
Develop computer programs in one or more high level language programming environment.
Design and develop structured and documented computer programs.
Integrate the computer programming techniques to solve practical problems.
Introduction
This is an individual assignment. There are 2 parts:
Criteria % of marks
ShowInfo 10
Questions 1 to 3 90
You are given a C++ program template file called A1Template.cpp. You are required to insert
C++ codes into the template file according to the given instructions. The final file (your
submission) will be a complete C++ program, which can be compiled and executed
successfully and is able to satisfy all the requirements in this specification.
Instruction
For each question, you only need to do either odd or even version based on the stated rule
about your student ID number (0 is considered as even). You do not need to write any
program codes to check the student ID number to determine the version you should do.
To answer the questions, you need to insert codes into the functions of the template file.
E.g., to answer question 1, write your code in the scope of Q1( ). When the program is
executed, enter the question number to run the code of a particular question.
In each question, the program should first accept input(s) from user WITHOUT printing
any prompt messages (Hint: cin statements will be used, and there is NO output messages
like “Input n: ” before the cin statements).
You may assume that user always provides valid input. NO error input checking is needed
unless it is required by the question.
Follow EXACTLY the requirement as stated in the questions. Check the correctness of
your code by executing it before your submission. Test your program carefully by using
input test cases as stated in the sample display, as well as other necessary test cases you can
think of. Correct output with same output format as the sample display is expected.
Marks are awarded based on the number of test cases that your program can successfully
pass without mistakes.
SEHH2042 23/24 Semester Two – Individual Assignment 1 Page 2
You may include more header files and write user-defined functions to solve the questions.
E.g., you may write a user-defined function for solving question 1, and call it in the given
function Q1( ). (refer to “Using template file” on the last page)
Apart from inserting codes as mentioned above, you are NOT allowed to modify any given
codes or the main function in the template file.
IMPORTANT: Make sure that your submitted file CAN be opened and has NO syntax
error. It should be the source code, using .cpp as the file extension. Your submission should
NOT be other file types such as .zip or .sln.
ShowInfo (10%)
Insert your code in the showInfo function so that your personal particulars are displayed in the
following format when the program executes:
Sample display:
Name : XXX YYY ZZZ
Student ID: 23xxxxxxA
Class : B01A
SEHH2042 23/24 Semester Two – Individual Assignment 1 Page 3
Question 1 (30%)
Write a program to calculate the total fee of booking a meeting room. The fee calculation must
take into account the duration of the meeting, the number of attendees, and apply differential
pricing for peak hours and holidays. The program should accept the following user inputs in
exact order given below:
1. Number of persons attending the meeting
2. Start time of the booking (an hour value in 24-hour format)
3. End time of the booking (an hour value in 24-hour format)
4. Whether the booking date is a holiday (a character ‘y’ or ‘n’)
5. Whether the booking is made by a student (a character ‘y’ or ‘n’)
The program then calculates and prints the final booking fee according to the charging table
and the charging rules provided below.
Charging Table (in dollars)
Room Type Fee per hour
(Odd Version)
Fee per hour
(Even Version)
Small Room, for 1 to 6 attendees 50 58
Medium Room, for 7 to 12 attendees 98 102
Large Room, for 13 attendees or above 188 198
In this question, determine you should use either the odd or even version of this question by
referring to the 4th digit of your student ID number. For example, 23547631A uses even
version.
Charging Rules
Input for the number of persons is always positive.
The start time and end time of the booking are always between 0 and 23, and the end time
is always larger than the start time (i.e., the minimum booking duration is one hour).
If the booking date is a holiday, a 50% surcharge on the fee per hour is added.
If the booking is made by a student, a 10% discount on the final fee will be applied.
If the booking time falls between peak hours, for the booking hours during the peak hours,
a 20% surcharge on the fee per hour is added.
Peak hours for ODD version: 0800 – 1700. Peak hours for EVEN version: 0900 – 1800.
If the booking duration is equal to or exceeds 4 hours, a 20% discount on the final fee will
be applied.
The final fee is calculated and displayed after all user inputs are received. Its value should be
displayed formatted to two decimal places.
SEHH2042 23/24 Semester Two – Individual Assignment 1 Page 4
Odd Version
Sample display
5
6
8
n
n
100.00
Sample display
15
10
15
y
y
1218.24
Sample display
8
15
19
n
y
310.46
Sample display
8
7
12
y
n
682.08
Sample display
12
18
22
n
n
313.60
Even Version
Sample display
5
6
8
n
n
116.00
Sample display
15
10
15
y
y
1283.04
Sample display
8
15
19
n
y
337.82
Sample display
8
7
12
y
n
685.44
Sample display
12
18
22
n
n
326.40
IMPORTANT NOTE: You need to follow all text and order as shown in the sample display.
There should be NO prompt messages and NO additional blank lines in the output. DO NOT
add extra text in the output which will be considered as incorrect in marking.
SEHH2042 23/24 Semester Two – Individual Assignment 1 Page 5
Question 2 (30%)
Write a C++ program that calculates and displays the future value of a retail green bond
investment at the end of an investment period. The program should ask the user for two pieces
of information in an order given below (you can assume both inputs are always positive):
1. The initial investment amount (a double value)
2. The number of months the bond is kept (an integer value)
The program computes the future value of the bond investment, based on compound interest
and a bonus for long-term investments. A 5% bonus is added to the final value of bonds held
longer than 36 months. The program should compute the future value, added with bonus if any,
of the bond investment at the end of the investment period, and print it out in the format
rounded to the nearest dollar.
Use the following formula to calculate the future value (FV) of the investment:
FV ൌ PV ∗ ሺ1rሻ୬
FV = Future value of the investment after n compounding periods
PV = Initial investment amount
r = Annual interest rate divided by the number of compounding periods per year
n = Total number of compounding periods
In this question, use the 5th digit of your student ID number to determine odd or even
version.
5th digit of Student ID Annual Interest Rate Interest released
Odd 3.5% Every 4 months
Even 4.5% Every 6 months
Sample display (for odd)
50000
30
54229
Sample display (for odd)
80000
42
94331
Sample display (for even)
50000
30
55884
Sample display (for even)
80000
42
98157
IMPORTANT NOTE: You need to follow all text and order as shown in the sample display.
There should be NO prompt messages and NO additional blank lines in the output. DO NOT
add extra text in the output which will be considered as incorrect in marking.
SEHH2042 23/24 Semester Two – Individual Assignment 1 Page 6
Question 3 (30%)
Write a program that displays the patterns as shown below, according to the input size, which
determines the number of rows and columns in the pattern. You can assume the input integer
is always positive.
In this question, use the 6th digit of your student ID number to determine odd or even version.
Odd Version (odd 6th digit in student ID)
Sample display
Even Version (even 6th digit in student ID)
Sample display
More examples (Note the difference in the pattern required for an odd or even input)
Input Output (Odd Version) Output (Even Version)
IMPORTANT NOTE: You need to follow the spacing as shown in the sample display. There
is ONE blank space between adjacent asterisk (*) symbol along one line. There should be NO
prompt messages for the input size and NO additional blank lines in the output. DO NOT add
extra text in the output which will be considered as incorrect in marking.
SEHH2042 23/24 Semester Two – Individual Assignment 1 Page 7
Submission
You are required to insert your C++ code into the given template file, and submit the final
source file to Blackboard before the deadline. Use your student name and ID as the filename:
StudentID_Name.cpp. Remove all spaces, hyphens and other non-letter characters in the
filename. The correct filename should look like: 12345678A_ChanTaiMan.cpp.
Grading
Your program (i.e. the template file with your answers) will be executed by script with different
test cases in Microsoft Visual Studio using the Release setting. The tester will execute the
program and enter the question number in “Program Selection Menu” to test a particular
question. The program will be restarted for testing each question individually.
You need to follow EXACTLY the above input and output requirements. Any deviation from
the requirement is considered as incorrect and no mark is given for that test case.
Late submission: 100% deduction. No late submission is allowed. Submit your work to
Blackboard some time ahead of the deadline. Late submissions due to slow internet speed will
not be accepted.
Syntax error: 5% - 20% deduction depends on the seriousness of the syntax error. You will
get 0 mark if your program contains too many syntax errors. Check your final source file using
Microsoft Visual Studio (not those online compliers) carefully before submission.
Runtime error: No mark for the particular test case that triggers the runtime error (e.g. infinite
loop, divide by zero, etc.).
Logic error (bug): No mark for the particular test case that deviates from the requirement.
Note that a logic error may lead to failure in ALL test cases of a question, e.g. displaying
unnecessary messages, incorrect parameter values, incorrect number format, or incorrectly
decide the odd/even version, etc.
Ensure the originality of your work. Plagiarism in any form is highly prohibited.
SEHH2042 23/24 Semester Two – Individual Assignment 1 Page 8
Using template file
If you implement the questions in separated source files, you need to copy the program codes
into the template file for assignment submission. Make sure to test the final source file (i.e.
template file with your answers) in Microsoft Visual Studio before submission.
myQuestion1.cpp
#include
#include
using namespace std;
void display(int n) {
cout << "This is appendix\n";
cout << "Display a number: " << setw(5) << n;
}
int main() {
int number = 1234;
display(number);
return 0;
}
Template.cpp
// Insert more header files when necessary
#include
#include
using namespace std;
void showInfo()
{
// Insert your codes to display your personal particulars here
}
// Insert your function, class (if any) for Q1() here
void display(int n) {
cout << "This is appendix\n";
cout << "Display a number: " << setw(5) << n;
}
void Q1()
{
// Insert your codes for Question 1 here
int number = 1234;
display(number);
}
// ... the rest of the template file ...
1. The header files included in your program should also be included in the template file.
2. The user-defined function / class for a question should be copied before the question.
3. The program main body, except “return 0”, should be copied to the function body of the
corresponding question.
- End -
3
1
2
软件开发、广告设计客服
QQ:99515681
邮箱:99515681@qq.com
工作时间:8:00-23:00
微信:codinghelp
热点项目
更多
data程序代写、代做c/c++编程语...
2024-05-17
data程序代写、代做python编程...
2024-05-17
program代做、c/c++,python程...
2024-05-17
代写math 3333 3.0 - winter 2...
2024-05-17
代做seng6110 programming ass...
2024-05-17
代写seng6110 object oriented...
2024-05-17
代写comp828: statistical pro...
2024-05-17
代做culture and society调试数...
2024-05-17
代做comp 4911 winter 2024 as...
2024-05-17
代做lh physical iiib / 03 33...
2024-05-17
代做3032ict big data analyti...
2024-05-17
代写comp4702 report代写留学生...
2024-05-17
代写fin2020 hw6代写c/c++编程
2024-05-17
热点标签
fit2004
fit3152
mec208
econ20120
cpt304
econ2101
econ0051
engi4547
econ1048
eengm2510
fit1008
7033mkt
ec2066
cct380h5f
man00019m
mech265001
fin2020
fit9137
n1542
csc4140
math6119
comp1710
fina864
csys5020
busi4412
math5007
2702ict
dts204tc
comp2003j
cosc2673
ecmt2150
bff3121–
comu7000
stat6118
comp814
acc202
ematm0067
bit233
ecs776p
600543
bpln0025
comp3400
econ7030
159.342 ‐ operating
mang6134
math1005/math6005
geog5404m
comp1710/6780
infs 2042
inf6028
bman30702
math0002
msci242l
mgt11001
com00177m
bman71282
fit2001
cpt210
159.341
econ7310
comp3221
comp10002
cpt206
ecmt1010
finm081
econ2005
cpt202
fit3094
socs0030
data7201
data2x01
mn-3507
mat246h1
ib2d90
ib3j80
acc207
comp90007
compx518-24a
fit1050
info1111
acct2201
buad801
compsci369
cse 332s
info1110
math1033
scie1000
eeee2057
math4063
cmt219
econ5074
eng5009
csse2310/csse7231
ec333
econ0001
cpt204
elec4630
ma117
dts104tc
comp2017
640481
csit128
eco000109m
finc5090
ggr202h5f
nbs8295
4ssmn902
chc6171
dsa1002
ebu6304
comp1021
csci-ua.202
com6511
ma416
mec206
iom209
bism7202
idepg001
cpt106
comp1212
ecom209
math1062
mn-3526
fnce3000
fmhu5002
psyc10003
fina2222
be631-6-sp/1
finc2011
37989
5aaob204
citx1401
econ0028
bsan3204
comp9123
cmt218
itp122
qbus6820
ecmt1020
bus0117
soft3202/comp9202
basc0057
mecm30013
aem4060
acb1120
comp2123
econ2151
ecmt6006
inmr77
com 5140
ocmp5328
comp1039
had7002h
cmt309
asb-3715
elec373
cpt204-2324
be631-6-sp
econ3016
mast10007
buss6002
comp4403
comp30023
finm1416
csc-30002
6qqmn971
fin668
mnfg309
inft2031
cits1402
comp2011
eecs 3221
ebu4201
ct60a9600
com336
8pro102
econ7300
comp3425
comp8410
comp222
finm8007
comp2006
comp26020
comp1721
eeen3007j
cis432
csci251
comp5125m
com398sust
finm7405
econ7021
fin600
infs4205/7205
mktg2510-
32022
mth6158
comp328
finn41615
2024
mec302
联系我们
- QQ: 9951568
© 2021
www.rj363.com
软件定制开发网!