Logo Studenta

ICTPRG_1 - Carlos D

¡Este material tiene más páginas!

Vista previa del material en texto

KNOWLEDGE ACTIVITY
Assessment Task - SHORT ANSWER QUESTIONS
Q1. Please describe following documentation techniques:
1. Product Documentation
Product documentation is a group of papers that give thorough information on a product or service, such as its features, specs, and functionality. This documentation is designed for developers, project managers, and other stakeholders engaged in the product's development. Product specifications, design papers, user manuals, release notes, and maintenance instructions are common examples.
2. Process Documentation
The recording and documentation of processes inside an organization, including how they are conceived, executed, and modified, is referred to as process documentation. This form of documentation is essential for guaranteeing consistency and efficiency in corporate processes, as well as for allowing communication across various departments and stakeholders. Process documentation is commonly comprised of process maps, protocols, work instructions, and training materials.
3. User Experience Design Documentation
User Experience Design Documentation: Refers to the documentation that records the design decisions and guidelines linked to the user experience of a product or service. This form of documentation, which includes materials like as user research reports, user personas, wireframes, mock-ups, and usability testing results, is critical for ensuring that the product or service fulfills the requirements and expectations of its users. Designers, developers, and product managers frequently employ user experience design documentation throughout the product development process.
Q2. What are data structures?
Data structures are a method of arranging and storing data in the memory of a computer so that it may be accessed and utilized effectively. They allow you to manage enormous volumes of data, and different data structures are optimal for particular sorts of operations including insertion, deletion, and retrieval.
Q3. How data structures are used?
Data structures are used to store and organize data in a way that enables for efficient information access, modification, and retrieval. They offer a foundation for data management and manipulation in computer applications.
Data structures can be found in a variety of applications, including database management systems, operating systems, compilers, search engines, and many more. Databases, for example, employ data structures such as tables, indexes, and trees to effectively store and retrieve data. Operating systems manage resources and scheduling using data structures such as queues and stacks. Compilers process and analyze code using data structures such as parse trees.
Q4. Programs written for a graphical user interface have to deal with "events." Explain what is meant by the term event. Give at least two different examples of events, and discuss how a program might respond to those events. 
Mouse Click Event: The application must respond to this event when the user clicks a button on the user interface. For example, if a user hits the "Submit" button on a registration form, the application may reply by collecting the user's input, verifying it, and sending it to the server for processing.
Keyboard event: When the user presses a key on the keyboard, the application must reply to this event. When a user puts a letter into a search field, for example, the software may reply by looking for objects that match the user's input.
Q5. What are exceptions? What is the difference between checked and unchecked exceptions?
An exception in Java is an occurrence that disrupts the usual flow of a program's execution. An exception can occur during runtime and signal an error, unexpected behavior, or any other unusual event.
There are two sorts of exceptions in Java: verified exceptions and unchecked exceptions.
Checked exceptions are exceptions that must be specified in a method's signature or handled explicitly by a try-catch block. At compilation time, the compiler looks for certain exceptions, and if they are not handled or declared, the code will fail to compile. Checked exceptions are often used to manage predicted errors that may arise during program execution. A FileNotFoundException, for example, is a checked exception that is raised when a file cannot be located.
Unchecked exceptions, also known as runtime exceptions, are not verified at compilation time and do not need to be explicitly handled via a try-catch block. Unchecked exceptions happen at runtime and are usually triggered by programming mistakes like division by zero or null pointer references. ArithmeticException and NullPointerException are two examples of unchecked exceptions.
Q6. What is polymorphism? 
Polymorphism is a key notion in object-oriented programming that allows various types of objects to be treated as if they are the same type. It is an object's capacity to take on several forms or shapes, and it allows objects of various classes to be utilized interchangeably.
Q7. Please describe following GUI Design Standards:
· Presentation of Information
· The way graphical user interfaces (GUIs) show data, text, and other components to users is referred to as information presentation. Several design guidelines assist to guarantee that information is presented in a clear and intelligible manner.
· Grouping of Information
Information grouping relates to how information is structured and presented to users. Grouping information logically and consistently can assist users in better understanding and navigating the GUI.
· Information Sequencing
The order in which information is delivered to users is referred to as information sequencing. To assist users in completing activities efficiently, a well-designed GUI should show information in a logical and intuitive sequence.
Q8. Please describe:
· Programming in the large
Large-scale programming, on the other hand, refers to the creation of large-scale software systems that have several components and require the participation of multiple developers. This kind of software development necessitates a more structured and organized approach that includes project management, program architecture, and team communication. The emphasis is on creating a unified and scalable software system that satisfies the demands of users and stakeholders.
· Programming in the small
Writing little chunks of code that perform certain duties and are intended to be reused in bigger programs is referred to as programming in the small. Typically, this strategy entails creating functions, modules, and libraries that can be readily merged into bigger applications. The emphasis is on producing code that is clean, modular, and maintainable so that it may be reused across numerous projects.
· 
Practical Activity
Assessment Task - Unit Project
• Design and build application programs from a problem scenario and program specification
• use object oriented programming language.
Case Study: Amazing Dessert Bar
Mr Amazing has opened the Amazing Dessert Bar in 2017. Due to the business recent growth, the manual processes are no longer able to handle the orders. With the data stored in the database, management will be able to ensure that data are current and more accurate. 
In lieu of this, Mr Amazing has decided to contact your consultancy company to set up a solution to deal with the day to day running of the business.
Customers arrive at the dessert bar and place their orders with staff at the counter. Customers have the option to provide their details (first name, last name, city and mobile number) to staff who adds the record into the database. Once registered, staff can enter the customer ID to the order.
The dessert bar sells various types of items (each has a name and price).
Each order consists of a sale of one or more items. Staff takes the order, advise on total amount owed, and collects the payment from the customer (only cash and card are accepted). The date when the order was taken needs to be recorded.
The dessert barprovides a pre-order service. Customer’s details need to have a record in the database upon requesting the pre-order with staff. If pre-ordering for the first time, staff needs to enter the customer details in the database before placing the pre-order. The date when the pre-order was taken needs to be recorded. When making the pre-order, customers need to provide a date and time for collection.
The ID of the staff who took the order or pre-order needs to be recorded.
Each staff needs to have a profile created in the database with the personal information (first name, last name), hire date, job role (staff or manager), username and password.
Task 1: Design queries, screens and reports
User Interface requirements
Task 2: Develop the application:
Develop a Java program that communicates with the database and manipulate its data. 
What to do
Create the front-end interface using Java Standard Widget Toolkit (SWT) 
You can use WindowBuilder or another tool to design the SWT application. You have to develop the GUIs for the following:
· User Login 
· Dashboard
· Non-admin user view – should only be able to register customers, place orders and pre-orders
· Admin user view – should be able register customers, place orders and pre-orders, register staff and view reports
· Customer registration
· Staff registration
· Place order
· Place pre-order
· View reports
· View orders
· View pre-orders
Develop encryption, using Java programming to secure data communication between application front-end (client) and backend server (database). 
Hint: 
· import java cryptographic library
Useful links:
 
https://docs.oracle.com/javase/tutorial/security/userperm/index.html
 
https://docs.oracle.com/cd/E12839_01/core.1111/e10043/introjps.htm#JISEC1816
 
https://tersesystems.com/blog/2015/12/22/an-easy-way-to-secure-java-applications/
Encryption is the most effective way to achieve data security, and sensitive information should always be protected.
Due to data sensitivity, your program should include data encryption and decryption for the password.
Implement the following: When the user signs up, they enter a password, which needs to be encrypted before being stored in the database. Upon login, the password entered needs to be validated and matched with the value stored in the database to grant system access. 
Test the application
The application needs to be tested for the functionalities below. You have to test and take a screenshot of the outcome to ensure that the code is working as expected.
· User Login 
· Correct username and password entered
· Dashboard
· Non-admin user view – should only be able to register customers, place orders and pre-orders
· Admin user view – should be able register customers, place orders and pre-orders, register staff and view reports
· Customer registration
· Staff registration
· Place order
· Place pre-order
· View reports
· View orders
· View pre-order
What to submit
· After developing and debugging your program, submit your program as a JAR file with the source code.
Task 3: Confirm the design with client:
You will need to obtain final approval from Amazing Dessert Bar Management . 
What to do
Complete the below application sign-off form and submit it in your assessment document for signing and final approval (your trainer won’t actually sign this form but will return it to you with feedback to help improve if necessary).
If the feedback requires that you need to make changes then you take on-board their recommendations, make changes to resolve the issues, and resubmit your work again for final approval.
	PROJECT NAME: AMAZING DESSERT BAR
	Application Design and Functionality signoff
	YES/NO
	Amazing Dessert Bar physical database meets functional requirements and accommodates business rules by being able to generate the required reports.
	
	Feedback:
	
	System security protects Amazing Dessert Bar data
	
	Feedback:
	Data Modelling by: …………………………………………………………………………… Date: ……………………
Amazing Dessert Bar Management (trainer):…….……………………….. Signature: ………………………………
Summary of deliverables
Please replace SID for your student number when naming the files.
Here is a summary of files that you have to submit:
◻ Java application JAR with the source code.
Documents with the proofs and database.
Answer the following testing questions
Source Code: 
package com.example.demo;
import databaseamarest.xlsx.*;
import javafx.application.Application;
import javafx.fxml.FXMLLoader;
import javafx.scene.Scene;
import javafx.stage.Stage;
import jdk.internal.module.ModuleInfoExtender;
import java.io.IOException;
import java.sql.*;
import java.util.Properties;
import java.util.logging.Logger;
public class QueryExample {
 private static final Object FROM = 3;
 private static ModuleInfoExtender fp;
 public static <DriverManager> void main (String[] args) throws SQLException, IOException
 {
 //Load and register Oracle driver
 DriverManager DriverManager = null;
 DriverManager.toString(); //Establish a connection
 Statement sql_stmt;
 Class<?> conn;
 conn = DriverManager.getClass();
 //Create a Statement object
 Statement sql_stmt = conn.getNestMembers();
 //Create a ResultSet object, execute the query and return a
 // resultset
 String str;
 Object deptno = new Object(3);
 ResultSet rset;
 rset = sql_stmt.executeQuery("SELECT empno, ename, sal,
 deptno FROM; Object empORDER = null;
 empORDER; BY ename");
 //Process the resultset, retrieve data in each row, column by column
 //and write to an operating system file
 String str = "";
 while (rset.next())
 {
 str += rset.getInt(1)+" "+ rset.getString(2)+" "+
 rset.getFloat(3)+" "+rset.getInt(4)+"\n";
 }
 byte buf[] = str.getBytes(); OutputStreamfp = new FileOutputStream("query1.lst");
 fp.write(buf);
 fp.clone();
//Close the ResultSet and Statement
 rset.close();
 sql_stmt.close();
 //Close the database connection
 conn.close();
 }
 public static void setFp(ModuleInfoExtender fp) {
 QueryExample.fp = fp;
 }
 private static class OracleDriver implements Driver {
 @Override
 public Connection connect(String url, Properties info) throws java.sql.SQLException {
 return null;
 }
 @Override
 public boolean acceptsURL(String url) throws java.sql.SQLException {
 return false;
 }
 @Override
 public DriverPropertyInfo[] getPropertyInfo(String url, Properties info) throws java.sql.SQLException {
 return new DriverPropertyInfo[0];
 }
 @Override
 public int getMajorVersion() {
 return 0;
 }
 @Override
 public int getMinorVersion() {
 return 0;
 }
 @Override
 public boolean jdbcCompliant() {
 return false;
 }
 @Override
 public Logger getParentLogger() throws SQLFeatureNotSupportedException {
 return null;
 }
 }
}
public class HelloApplication extends Application {
 @Override
 public void start(Stage stage) throws IOException {
 FXMLLoader fxmlLoader = new FXMLLoader(HelloApplication.class.getResource("hello-view.fxml"));
 Scene scene = new Scene(fxmlLoader.load(), 320, 240);
 stage.setTitle("Hello!");
 stage.setScene(scene);
 stage.show();
 }
 public static void main(String[] args) {
 launch();
 }
}
Application Testing
User Login  
Correct username and password entered
	Action
	Input
	Expected Output
	Test Result
	Test Date and Initials
	Enter correct username and password and click login button
	Username and passcode
	Successfully loggedin
	Test worked
	May 3rd 2023
	Outcome screenshot
	
Incorrect username and password entered 
	Action
	Input
	Expected Output
	Test Result
	Test Date and Initials
	Enter incorrect username and password and click login button
	Username and passcode
	Invalid login info
	When entering wrong info provided error
	May 3rd 2023
	Outcome screenshot
	
Dashboard 
Admin user view 
	Action
	Input
	Expected Output
	Test Result
	Test Date and Initials
	User with admin rights signs in
	Admin user info in login
	Successful loign
	worked
	May 3rd 2023
	Outcome screenshot
	
Non-admin user view 
	Action
	Input
	Expected Output
	Test Result
	Test Date and Initials
	User with non-admin rights signs in
	Non-admin dredential
	Error
	Will recerive test error is not available yet
	May 3rd 2023
	Outcome screenshot
	
Booking list 
Make a booking 
	Action
	Input
	Expected Output
	Test Result
	Test Date and Initials
	User enters a booking into the database
	Enter booking info
	worked
	worked
	May 3rd 2023
	Outcome screenshot
	
	Action
	Input
	Expected Output
	Test Result
	Test Date and Initials
	User searches for a non-existing booking
	Accesing with right details and going to view ordes
	Order details
	worked
	May 3rd 2023
	Outcome screenshot
	
	Action
	Input
	Expected Output
	Test Result
	Test Date and Initials
	User searches for an existing booking
	Accesing with right details and going to view ordes
	View orders hard tool.
	worked
	May 3rd 2023
	Outcome screenshot
	
Edit a booking 
	Action
	Input
	Expected Output
	Test Result
	Test Date and Initials
	User clicks on Edit Booking button
	<Enter information here>
	<Enter information here>
	worked
	May 3rd 2023
	Outcome screenshot
	
Table assignment 
Assign a table to a booking 
	Action
	Input
	Expected Output
	Test Result
	Test Date and Initials
	User selects a table and clicks on assign table button
	Accesing with right details and going to view ordes
	Welcome site
	worked
	May 3rd 2023
	Outcome screenshot
	
Create staff 
New staff user is created
	Action
	Input
	Expected Output
	Test Result
	Test Date and Initials
	User enters staff details to create a new user
	Accesing with right details and going to view ordes
	Registration process
	worked
	May 3rd 2023
	Outcome screenshot
	
Edit staff 
Edit staff details
	Action
	Input
	Expected Output
	Test Result
	Test Date and Initials
	User edits staff details 
	Enter new details
	Staff info updated
	Form to update staff details
	May 5th 2023
	Outcome screenshot

Otros materiales