Professional Documents
Culture Documents
A2 1618GCS0801B1 GCS18856 Le Duc Anh PDF
A2 1618GCS0801B1 GCS18856 Le Duc Anh PDF
Programming
ASSIGNMENT
No.2
Class: GCS0801B.1
ID: GCS18856
Assignment due:
Assignment submitted:
ASSIGNMENT 2 FRONT SHEET
Qualification BTEC Level 5 HND Diploma in Computing
GCS0801B.
Class Assessor name
1
Student declaration
I certify that the assignment submission is entirely my own work and I fully understand the
consequences of plagiarism. I understand that making a false declaration is a form of
malpractice.
Student’s signature
Grading grid
P2 P3 P4 P5 M2 M3 M4 D2 D3 D4
Unit Tutor
Submission
Issue date
date
Submission Format:
Format: The submission is in the form of an individual written report.
This should be written in a concise, formal business style using
single spacing and font size 12. You are required to make use
of headings, paragraphs and subsections as appropriate, and
all work must be supported with research and referenced
using the Harvard referencing system. Please also provide a
bibliography using the Harvard referencing system.
Submission Students are compulsory to submit the assignment in due
date and in a way requested by the Tutors. The form of
submission will be a soft copy in PDF posted on corresponding
course of http://cms.greenwich.edu.vn/
Note: The Assignment must be your own work, and not
copied by or from another student or from
books etc. If you use ideas, quotes or data (such as diagrams) from
books, journals or other sources, you must reference your sources, using
the Harvard style. Make sure that you know how to reference properly,
and that understand the guidelines on plagiarism. If you do not, you
definitely get fail
Assignment Brief and Guidance:
Scenario: You have applied for a post as a trainee with a software development
company and have been invited for an interview. You have been passed the
presentation to demonstrate your problem solving and basic programming skills. Now
you are given a more challenge task to create a fully working, secure application that
has been developed using an IDE and adheres to coding standards for a detailed
business problem.
Tasks
You will discuss a suitable problem with your mentor and list the user requirements
before designing, implementing (coding) and testing a solution. You will create a
report that should include:
● Introduction to your program (list of requirements and screenshots of program)
● Explain some of programming paradigms. Evaluate why and how your program use
these (or some of) paradigms.
● Explain the common features of an IDE should have and evidence of how the IDE
was used to manage the development of your code.
● An evaluation of developing applications using an IDE versus developing an
application without using an IDE.
● An explanation and evaluation of the debugging process in the IDE used and how it
helped with development.
● An explanation and evaluation of coding standards used in your program and the
benefits to organisations of using them.
The working application produced must also be demonstrated together with the
presentation.
Table of Contents
Programming......................................................................................................... 1
ASSIGNMENT......................................................................................................... 1
1. Introduction to my program:........................................................................5
2. Some of programming paradigms:...............................................................6
3. The common features of an IDE should have:..............................................6
4. Review of using and not using the IDE:........................................................7
5. Explain and evaluate the debugging process in the IDE:.............................7
6. An explanation and evaluation of coding standards:....................................8
1. Introduction to my program:
Hotel Z needs to manage a number of guests coming in and out of
that hotel. The hotel proposed giving each person an ID card for
easy management. This program was created to do just that
Request:
Enter the number of guests entering the hotel
Enter name, age
See the list of guests currently in the hotel
Find guests by id
class People
{
private string name;
private int id;
private DateTime BirthDay;
public void SetID(int id)
{
this.id = id;
}
public int GetID()
{
return this.id;
}
public void Setname(string name)
{
this.name = name;
}
public void SetBirthday(DateTime birthday)
{
this.BirthDay = birthday;
}
public People()
{
// TODO: Complete member initialization
}
public void Display()
{
Console.WriteLine("ID= {0}", id);
Console.WriteLine("People Name: {0}", name);
Console.WriteLine("Age: {0}", BirthDay);
Console.WriteLine("\n--------------------\n");
}
public void PrintPeople()
{
People[] peoplelist = new People[0];
int length = int.Parse(Console.ReadLine());
peoplelist = new People[length];
int index = 1;
Menu:
Console.Clear();
Console.WriteLine("1. Enter people to the hotel:");
Console.WriteLine("2. List of people entering the hotel:");
Console.WriteLine("3. Find people by ID");
Console.WriteLine("4. Exit");
Console.Write("Choose the one you want to do: ");
string ok = Console.ReadLine();
switch (ok)
{
case "1":
{
People Sn = new People();
Console.Write("Enter name:");
string name = Console.ReadLine();
Sn.Setname(name);
Console.Write("Enter Birthday:");
BirthDay = DateTime.Parse(Console.ReadLine());
Sn.SetBirthday(BirthDay);
Sn.SetID(index + 100);
peoplelist[index] = Sn;
index++;
goto Menu;
}
case "2":
Console.WriteLine("List of people staying at the hotel\n----------------\n");
foreach (People s1 in peoplelist)
{
if (s1!=null)
{
s1.Display();
}
}
Console.ReadLine();
goto Menu;
case "3":
Console.WriteLine("Enter the ID you want to find: ");
string tk = Console.ReadLine();
foreach (People s2 in peoplelist)
{
if (s2==null)
{
Console.WriteLine("No people in this ID");
}
else
{
s2.Display();
}
}
Console.ReadLine();
goto Menu;
case "4":
break;
default:
Console.WriteLine("Enter a mistake, only values from 1 to 4");
Console.ReadLine();
goto Menu;
}
}
}
}
Explanation:
_ Coding standard is a set of rules for writing code of a program that
programmers must follow when participating in developing that program.
• How you write statements in the language, organize them into
“modules,” format them in the source files.
• How you create names.
• How you write comments.
Evaluation:
• Easy to maintain, fix errors.
• Can help others people to understand your source code.
• It is possible to unify the code between team members.
References
1.http://kcntt.duytan.edu.vn/Home/ArticleDetail/vn/168/1648/mo-hinh-lap-
trinh-programming-paradigms [Accessed 25 Oct. 2019].
2. https://vi.wikipedia.org/wiki/Visual_Studio [Accessed 25 Oct. 2019].
3.https://voer.edu.vn/c/quan-ly-loi/9f00d32d/4e570d06 [Accessed 25 Oct.
2019].
4. https://cppdeveloper.com/c-nang-cao/ky-thuat-debug-tren-visual-studio/
[Accessed 26 Oct. 2019].
5. https://www.ohay.tv/view/debug-la-gi-va-vi-sao-lap-trinh-vien-can-phai-
biet-debug/5bbc0a402c [Accessed 26 Oct. 2019].
6. https://quantrimang.com/ly-do-lua-chon-lap-trinh-csharp-162288
[Accessed 26 Oct. 2019].
7.
http://www.thayphet.net/application/upload/products/Lab01.LapWebBanha
ngVoiWebStore.pdf [Accessed 26 Oct. 2019].
8. https://cppdeveloper.com/c-nang-cao/ky-thuat-debug-tren-visual-studio/
[Accessed 27 Oct. 2019].
9.From teacher Son
10.From book Lap Trinh voi C#