Programing-------------------, Assignments of Human Development

C+ Development : Guitar Store development, explantion of software development life cycle, case diagram, flow chart, implementaion,.....

Typology: Assignments

2020/2021

Uploaded on 02/25/2021

trungdv123
trungdv123 🇻🇳

4.5

(4)

3 documents

1 / 28

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
ASSIGNMENT 1 FRONT SHEET
Qualification
BTEC Level 5 HND Diploma in Computing
Unit number and title
Unit 1: Programming
Submission date
13/12/2020
Date Received 1st submission
13/12/2020
Re-submission Date
Date Received 2nd submission
Student Name
Le Trong Trung
Student ID
GCH190392
Class
GCH0902
Assessor name
Do Hong Quan
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
Trung
Grading grid
P1
M1
D1
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c

Partial preview of the text

Download Programing------------------- and more Assignments Human Development in PDF only on Docsity!

ASSIGNMENT 1 FRONT SHEET

Qualification BTEC Level 5 HND Diploma in Computing Unit number and title Unit 1: Programming Submission date 13/12/2020 Date Received 1st submission 13/12/ Re-submission Date Date Received 2nd submission Student Name Le Trong Trung Student ID GCH Class GCH0902 Assessor name Do Hong Quan 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 Trung Grading grid P1 M1 D

❒ Summative Feedback: ❒ Resubmission Feedback:

Grade: Assessor Signature: Date: Lecturer Signature:

Before applying for an internship at this company, I did an internship and wrote programs for a number of stores. As being prepared for an interview, I am going to demonstrate problem solving and basic programming skills that I have learnt from the course Programming. In my opinion basically today programming languages include the main components such as:

  • Input
  • Output
  • The main function of the program
  • Test, fix error
  • Complete program *2. DEFINE THE PROBLEM SCENARIO I recently wrote a program for a guitar shop, because they don't have any effective management software.In the program, this software will help salespeople not have to remember all the titles and their prices. First I will develop it with the four main functions: add data of each product, display all data of products on the screen and write a bill of sales. *PROBLEM After surveying guitar shops around Hanoi. As a result, most guitar shops cannot remember the products and it will be difficult to control the number of products in stock and the price of each product is not accurate and about 80% of them relied on software to save time-solving product management problems and avoid loss of assets. *SOLUTION The problem was solved by a management software with the above mentioned. Specifically, the three most important things are the menu of the process where we can choose the main parts we go in to solve the problem, including entering

product information including the name, ID, quantity, and price of The product then prints all the information of the product we have entered and the last part is used to sell the book and its price.

II. EXPLANATION OF SOFTWARE DEVELOPMENT LIFE CYCLE.

Planning and Requirement Analysis Requirement analysis is the most important and fundamental stage in SDLC. It is performed by the senior members of the team with inputs from the customer, the sales department, market surveys and domain experts in the industry. This information is then used to plan the basic project approach and to conduct product feasibility study in the economical, operational and technical areas. Planning for the quality assurance requirements and identification of the risks associated with the project is also done in the planning stage. The outcome of the technical feasibility study is to define the various technical approaches that can be followed to implement the project successfully with minimum risks. (Mane, 2018) ➢ Defining Requirements Once the requirement analysis is done the next step is to clearly define and document the product requirements and get them approved from the customer or the market analysts. This is done through an SRS (Software Requirement Specification) document which consists of all the product requirements to be designed and developed during the project life cycle. (LiLi, 2020) ➢ Designing the Product Architecture SRS is the reference for product architects to come out with the best architecture for the product to be developed. Based on the requirements specified in SRS, usually more than one design approach for the product architecture is proposed and documented in a DDS - Design Document Specification. (LiLi, 2020) ➢ Building or Developing the Product In this stage of SDLC the actual development starts and the product is built. The programming code is generated as per DDS during this stage. If the design is performed in a detailed and organized manner, code generation can be accomplished without much hassle.

III. ANALYSE THE PROBLEM AND DESIGN THE SOLUTIONS.

Figure 1 .Use case diagram

Figure 2 .HIERACHY DIAGRAMFlowchart Menu This is a flowchart simulation for using loop and switch case to program. we see that when a user enters his or her choice, it will display the information within the selection that I made in it, if the user made a mistake it would allow the user to enter it again. For this example, if the user chooses 1, the screen will move to entering information for the products. Here because there are 4 cases equivalent to 4 options when the correct person entered in each option it will return to the main menu, particularly with option 4 we have set it by default when clicked, it will exit the program without returning main menu again.

Figure 3. Flowchart Menu Options

Flowchart Display( Show all ) This flowchart to print out all the information that was entered in the previous function. Figure 5. Flowchart Display information

Flowchart Bill of sale This is flowchart to calculate the sale of products with showall(); to display product information for checkers and guests to avoid forgetting the product price and availability. If (product1 <= 1) to run if the customer intends to buy only one type of product. And use For loop to run when customers buy a lot of products to run the loop for us to register many products as well as charge them. Figure 6. Flowchart Bill of sale

  • This function will mainly display the menu and let the user select the functions you want to use. It works primarily by calling sub-functions and letting them function as they have been programmed
  • Source Code static void Main(string[] args) //Main function { int choice; bool checkchoice = false; do { // Menu Console.WriteLine("\t\t\t\t********** Welcome to Guitar store *********"); Console.WriteLine("\t\t\t\t* ----------Menu programming-----------"); Console.WriteLine("\t\t\t\t1. Add Name, Amount, Price"); Console.WriteLine("\t\t\t\t2.Show All Name, Amount, Price"); Console.WriteLine("\t\t\t\t3.Bill of sale"); Console.WriteLine("\t\t\t\t4.Exit programming*"); Console.WriteLine("\t\t\t\t*********************"); Console.Write("Choose option from 1 to 4: "); while (!int.TryParse(Console.ReadLine(), out choice))

Console.WriteLine("Warning!!!! Please enter option by number "); } switch (choice) { case 1: Console.Clear(); //Clear screen Console.WriteLine("\t\t\t\t\t\tAdd Name, Amount, Price"); add(); //Call function add checkchoice = true; // If user run option 1 first checkoption = true Console.WriteLine("Press and key to continue. .. "); Console.ReadKey(); break; case 2: if (checkchoice == true) { Console.Clear(); // Clear screen Console.WriteLine("\t\t\t\t\t\tShow all Products "); Console.WriteLine(" =========================================== "); showall(); //Call function showall Console.WriteLine(" =========================================== ");

else { Console.WriteLine("<!!> ERROR: Program have not data, please choice 1 first."); Console.WriteLine("> Press 'Enter' to continue."); Console.Readkey(); } break; case 4: Console.Write("\n\n\n\n\n\t\t\t\t\t\t\tSEE YOU AGAIN!\n\n\n\n\n"); Console.ReadKey(); Console.Clear(); break; default: Console.WriteLine("<!!> ERROR: Invalid! Please click enter to input again."); Console.WriteLine("Press and key to continue. "); Console.ReadKey(); Console.Clear(); break; } } while (choice != 4);

  • Enter information function:
  • This function will ask the user to enter the product's information that users need to add.
  • This function of the program represents the user entering the product information such as name product, IDs, amount product, price of products that users need to be added. Where n is the number of product types you currently have and is added to the program. The program use if (current + n >= 2000) to make sure that the number of products we import does not exceed the number of elements in the array we create. Then use the for loop (int i = current; i < current + n; i ++) to run this loop to enter information and the number of books and their price.
  • Source code: