首页 > > 详细

INFS2605课程代做、代写Programming实验编程、java语言程序代做调试Matlab程序|代做R语言编程

INFS2605 Intermediate Business Programming
Term 3, 2020
INFS2605 Mid Term Assessment
This document describes the requirements and assessment criteria for the Mid Term
Assessment for INFS2605. For general enquiries, please use the edstem.org forum.
Contents
(1) Mid Term Assessment Overview .................................................................................................................................2
(2) Scenario and Code.............................................................................................................................................................3
(3) Assessment Questions ..................................................................................................................................................12
(4) Assessment Criteria ........................................................................................................................................................13
(4.1) Marking Rubric ............................................................................................................................................................13
(4.2) Assessments and Plagiarism ..............................................................................................................................13
(4.3) Problem-Solving Process......................................................................................................................................14
(5) Submission ...........................................................................................................................................................................15
(5.1) Software Recommendations for recording ...................................................................................................15
(5.2) Submission...................................................................................................................................................................15
(5.3) Late Submission Penalty .......................................................................................................................................15
(6) FAQ..........................................................................................................................................................................................16
Page 2 of 16
Revision 1, 5 October, 2020 (20t3)
(1) Mid Term Assessment Overview
The INFS2605 Mid Term Assessment is worth 20% of your overall INFS2605 mark. The
assessment involves creating a video recording of the student’s screen and voice to answer
questions and analyse a small Java program. The student must submit their recording in MP4
format (and any other visual aids used) via OneDrive by the submission date.
The Mid Term Assessment tests the student’s understanding of the first four weeks of content in
INFS2605. This document outlines three questions which students are required to answer for
this assessment. All questions are based around a fictional and incomplete Java application
named Lockdown Companion, created for the purpose of this assessment.
As included in the INFS2605 Field Manual, the topics covered in the first four weeks and tested
in this assessment include:
- INFS1609 Revision
- Data structures
- Database Connections
- Object-Relational Mapping
- Introduction to UX
- UI Elements
- Introduction to JavaFX
As per the INFS2605 Course Outline, the following Course Learning Outcomes will be tested in
this Mid Term Assessment:
- Interpret, review and share software code
- Design, write and evaluate programming solutions for small to medium scale problems
- Explain and apply MVC architecture in developing programming solutions
For questions on the Mid Term Assessment, consult the FAQ section of this document. If you
have a question that is not answered in this section, contact your lecturer by email
(d.mitra@unsw.edu.au) or via MS Teams.
Page 3 of 16
Revision 1, 5 October, 2020 (20t3)
(2) Scenario and Code
All questions in the Mid Term Assessment will be based off a fictional and incomplete Java
application named Lockdown Companion.
Do you miss travelling? Or do you simply yearn to see the world, but have been locked down due
to external factors out of your control? Then the Lockdown Companion is the perfect application
for you! The Lockdown Companion application offers virtual guided tours for anyone from the
comfort of their own home. Whether it’s a guided tour of The Louvre in France, a boat ride
through the canals of Venice, or a virtually tiresome trek through the trails of Machu Picchu, the
Lockdown Companion app can provide you the experiences of a lifetime without you leaving your
home!
The lockdown companion application will eventually be able to show you 3D virtual reality
representations of your favourite places around the world, and be able to recommend virtual trips
to you based off your previous virtual travels. Tours can either be Live with a tour guide showing
you around, or be pre-recorded sessions that you can view at any time at your leisure.
The Lockdown Companion application is a Java based application with a SQLite database that
stores user data and data on the virtual tours available on the platform. As a software and UX
Design expert, you are asked to analyse the codebase and design part of the UI of the Lockdown
Companion application. You are asked to provide your response to the questions in the form of a
screen and audio recording.
The original developer of the partially-built Lockdown Companion application has provided the
following Java files for your review (note that .fxml files and App.java are not included). The files
can be grouped into Controller and Model classes, and include an extra DatabaseManager class
for help with running SQL queries:
Controller Classes
• LoginController.java
• ToursController.java
Model Classes
• User.java
• TourGuide.java
• Customer.java
• Tour.java
• LiveTour.java
• PreRecordedTour.java
Database Helper
• DatabaseManager.java
LoginController.java:
package LockdownCompanion;
import java.io.IOException;
import javafx.fxml.FXML;
import javafx.scene.control.Label;
import javafx.scene.control.TextField;
/**
* FXML Controller for Login.fxml
* @author Devesh Mitra
* @version 0.1
*/
Page 4 of 16
Revision 1, 5 October, 2020 (20t3)
public class LoginController {
@FXML
TextField txtUsername;
@FXML
TextField txtPassword;
@FXML
Label lblLoginError;
@FXML
protected void initialize() {
// initialize login page here
lblLoginError.setText("");
}
@FXML
private void btnLoginWasClicked() throws IOException {
String username = txtUsername.getText();
String password = txtPassword.getText();
String pwdHash =
DatabaseManager.fetchPasswordHashByUsername(username);
if (BCrypt.checkpw(password, pwdHash)) {
lblLoginError.setText("Sorry, incorrect credentials.");
} else {
// login successful, clear error label and switch to Tours
screen
lblLoginError.setText("");
App.setRoot("tours");
}
}
}
ToursController.java:
package LockdownCompanion;
import javafx.fxml.FXML;
import java.util.ArrayList;
/**
* FXML Controller for Tours.fxml
* @author Devesh Mitra
* @version 0.1
*/
public class ToursController {
@FXML
ArrayList allTours;
@FXML
protected void initialize() {
// initialize tours page here
allTours = DatabaseManager.fetchAllTours();
}
}
Page 5 of 16
Revision 1, 5 October, 2020 (20t3)
User.java:
package LockdownCompanion;
import java.util.UUID;
/**
* Model Class for generic User of application
* @author Devesh Mitra
* @version 0.1
*/
public class User {
private UUID userUUID;
private String firstname;
private String lastname;
private String username;
public User(UUID userUUID, String firstname, String lastname, String
username) {
this.userUUID = userUUID;
this.firstname = firstname;
this.lastname = lastname;
this.username = username;
}

/**
* @return the userUUID
*/
public UUID getUserUUID() {
return userUUID;
}
/**
* @return the firstname
*/
public String getFirstname() {
return firstname;
}
/**
* @param firstname the firstname to set
*/
public void setFirstname(String firstname) {
this.firstname = firstname;
}
/**
* @return the lastname
*/
public String getLastname() {
return lastname;
}
/**
* @param lastname the lastname to set
*/
public void setLastname(String lastname) {
this.lastname = lastname;
Page 6 of 16
Revision 1, 5 October, 2020 (20t3)
}
/**
* @return the username
*/
public String getUsername() {
return username;
}
/**
* @param username the username to set
*/
public void setUsername(String username) {
this.username = username;
}
}
TourGuide.java:
package LockdownCompanion;
import java.util.UUID;
/**
* Model Class for Tour Guide (a type of user)
* @author Devesh Mitra
* @version 0.1
*/
public class TourGuide implements User {
private String tourCompanyName;
private String countryOfBirth;
public TourGuide (UUID userUUID, String firstname, String lastname,
String username, String tourCompanyName, String countryOfBirth) {
super(userUUID, firstname, lastname, username);
this.tourCompanyName = tourCompanyName;
this.countryOfBirth = countryOfBirth;
}

/**
* @return the tourCompanyName
*/
public String getTourCompanyName() {
return tourCompanyName;
}
/**
* @param tourCompanyName the tourCompanyName to set
*/
public void setTourCompanyName(String tourCompanyName) {
this.tourCompanyName = tourCompanyName;
}
/**
* @return the countryOfBirth
*/
public String getCountryOfBirth() {
return countryOfBirth;
Page 7 of 16
Revision 1, 5 October, 2020 (20t3)
}
/**
* @param countryOfBirth the countryOfBirth to set
*/
public void setCountryOfBirth(String countryOfBirth) {
this.countryOfBirth = countryOfBirth;
}
}
Customer.java:
package LockdownCompanion;
import java.util.UUID;
/**
* Model Class for Customer (a type of User)
* @author Devesh Mitra
* @version 0.1
*/
public class Customer extends User {
/**
* TODO: add new fields for Customisation / User Settings
*/
public Customer (UUID userUUID, String firstname, String lastname,
String username) {
super(userUUID, firstname, lastname, username);
}
}
Tour.java:
package LockdownCompanion;
/**
* Model Class for generic Tour
* @author Devesh Mitra
* @version 0.1
*/
public class Tour {
private TourGuide tourGuide;
public Tour (TourGuide tourGuide) {
this.tourGuide = tourGuide;
}

/**
* @return the tourGuide
*/
public TourGuide getTourGuide() {
return tourGuide;
}
/**
* @param tourGuide the tourGuide to set
*/
public void setTourGuide(TourGuide tourGuide) {
Page 8 of 16
Revision 1, 5 October, 2020 (20t3)
this.tourGuide = tourGuide;
}
}
LiveTour.java:
package LockdownCompanion;
import java.time.LocalDateTime;
/**
* Model Class for Live Tour (a type of Tour)
* @author Devesh Mitra
* @version 0.1
*/
public class LiveTour extends Tour {
private LocalDateTime startTime;
private LocalDateTime endTime;
public LiveTour (TourGuide tourGuide, LocalDateTime startTime,
LocalDateTime endTime) {
super(tourGuide);
this.startTime = startTime;
this.endTime = endTime;
}

/**
* @return the startTime
*/
public int getStartTime() {
return startTime;
}
/**
* @param startTime the startTime to set
*/
public void setStartTime(LocalDateTime startTime) {
this.startTime = startTime;
}
/**
* @return the endTime
*/
public LocalDateTime getEndTime() {
return endTime;
}
/**
* @param endTime the endTime to set
*/
public void setEndTime(LocalDateTime endTime) {
this.endTime = endTime;
}
}
PreRecordedTour.java:
package LockdownCompanion;
Page 9 of 16
Revision 1, 5 October, 2020 (20t3)
/**
* Model Class for Pre-Recorded Tour (a type of Tour)
* @author Devesh Mitra
* @version 0.1
*/
public class PreRecordedTour extends Tour {
private int lengthInMinutes;
private boolean supportsVirtualReality;
public PreRecordedTour (TourGuide tourGuide, int lengthInMinutes,
boolean supportsVirtualReality) {
super();
this.lengthInMinutes = lengthInMinutes;
this.supportsVirtualReality = supportsVirtualReality;
}

/**
* @return the lengthInMinutes
*/
public int getLengthInMinutes() {
return lengthInMinutes;
}
/**
* @param lengthInMinutes the lengthInMinutes to set
*/
public void setLengthInMinutes(int lengthInMinutes) {
this.lengthInMinutes = lengthInMinutes;
}
/**
* @return the supportsVirtualReality
*/
public boolean getSupportsVirtualReality() {
return supportsVirtualReality;
}
/**
* @param supportsVirtualReality the supportsVirtualReality to set
*/
public void setSupportsVirtualReality(boolean supportsVirtualReality)
{
this.supportsVirtualReality = supportsVirtualReality;
}
}
DatabaseManager.java:
package LockdownCompanion;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
Page 10 of 16
Revision 1, 5 October, 2020 (20t3)
import java.util.ArrayList;
/**
* Database helper methods for LockdownCompanion app
* @author Devesh Mitra
* @version 0.1
*/
public class DatabaseManager {
private static final String TABLE_NAME_FOR_USERS = "users";
private static final String TABLE_NAME_FOR_TOURS = "tours";
private static Connection sharedConnection;
/**
* This method is shared by all the `public static` methods in this
class, to reuse the same code.
* @return whether or not the connection was successfully opened
*/
private static boolean openConnection() {
boolean wasThisMethodSuccessful = false;
try {
DatabaseManager.sharedConnection =
DriverManager.getConnection("jdbc:sqlite:Tours.db");
wasThisMethodSuccessful = true;
} catch (SQLException e) {
e.printStackTrace();
} finally {
return wasThisMethodSuccessful;
}
}
public static ArrayList fetchAllTours() {
ArrayList allTours = new ArrayList();
try {
DatabaseManager.openConnection();
String sqlString = "SELECT * FROM " +
DatabaseManager.TABLE_NAME_FOR_TOURS;
Statement smt = sharedConnection.createStatement();
ResultSet rs = smt.executeQuery(sqlString);
while (rs.next()) {
if (rs.getString("tour_type") == "live") {
allTours.add(new LiveTour(rs.getString("tour_guide"),
rs.getTimestamp("start_time").toLocalDateTime(),
rs.getTimestamp("end_time").toLocalDateTime()));
} else {
allTours.add(new
PreRecordedTour(rs.getString("tour_guide"),
rs.getInt("length_of_tour_minutes"), rs.getBoolean("supports_vr")));
}
}
} catch (SQLException e) {
e.printStackTrace();
} finally {
return allTours;
}
}
public static String fetchPasswordHashByUsername(String username) {
Page 11 of 16
Revision 1, 5 October, 2020 (20t3)
String preparedReturn = "";
try {
DatabaseManager.openConnection();
String sqlString = "SELECT pwdHash FROM " +
DatabaseManager.TABLE_NAME_FOR_USERS
+ " WHERE username = *";
PreparedStatement psmt =
sharedConnection.prepareStatement(sqlString);
psmt.setString(1, username);
ResultSet rs = psmt.executeQuery();
while (rs.next()) {
preparedReturn = rs.getString("pwdHash");
}
} catch (SQLException e) {
e.printStackTrace();
} finally {
return preparedReturn;
}
}
}
Page 12 of 16
Revision 1, 5 October, 2020 (20t3)
(3) Assessment Questions
The following are the three questions required to be answered for the Mid Term Assessment.
1. The original developer of the Lockdown Companion codebase rushed their development
process and did not test their code. Find 5 errors in the Java codebase for the Lockdown
Companion Application, determine the fix for these errors, and present your fixes for the
coding errors. The errors may be syntactical or logical errors. Use visual aids to help
explain why your changes will fix the coding mistakes made by the original developer. (5
marks)
2. Design User Interfaces for the following Lockdown Companion App screens: the User
Customisation screen, and Tour Recommendations screen. Through the User
Customisation screen, the user of the application can customise their experience of the
application. For example, they can specify which countries or continents they would like
to visit next, change their visual and audio settings for the application, and customise
reminders and notifications of tours coming up. Through the Tour Recommendations
screen, the user can see upcoming tours recommended to them by the application, and
view a quick summary of the tours (including how much time is left until the tour, how long
the tour is, and who is organising or created the tour). You may add your own creative
ideas and functionality you think may be appropriate to these screens. Create your user
interfaces in a similar fashion to your Week 3 In-Tute exercise, and present your designs
in your video recording. Explain your use of Nielsen's 10 Design Heuristics in the User
Interfaces you have designed. (10 marks)
3. Without writing out the code for the UIs mentioned, design and describe the new classes
required to support the “Tour Recommendations” feature of the application, including the
methods and variables required by them. Your answer should take into account the MVC
framework, including classes required for Models and classes required for Controllers.
Think about what data is required to be stored by the Application, and how the user
would interact with the application. In your video, you should present (e.g. via a class
diagram) the classes and their methods and variables required to support the
functionality. (5 marks)
It is recommended to use visual aids to support your recordings as you answer these questions.
For example, use PowerPoint slides to show your fixes for the errors from question 1, present
your UI designs for question 2, and use a Java Class diagram to show the classes (including
methods and variables) you designed for question 3.
Page 13 of 16
Revision 1, 5 October, 2020 (20t3)
(4) Assessment Criteria
(4.1) Marking Rubric
The following marking rubric will be used to mark the INFS2605 Mid Term Assessment:
Question 1 Question 2 Question 3
1-2 errors and solutions are

联系我们
  • QQ:99515681
  • 邮箱:99515681@qq.com
  • 工作时间:8:00-23:00
  • 微信:codinghelp
热点文章
程序代写更多图片

联系我们 - QQ: 99515681 微信:codinghelp
© 2014 www.7daixie.com
程序代写网!