Urist
Expert Member
- Joined
- Mar 20, 2015
- Messages
- 3,814
- Reaction score
- 2,581
What would be better than asking gpt?
maybe you guys.
Assignment 3:
Tomorrow, 11:00 PM
Course event
189232
Do not attempt this project before you have completed the lessons in Class 3 as well as the Self Assessments 2, 3 and 4.
Note on GenAI and XAI Usage: You are encouraged to use Generative AI tools (GenAI) to assist you in this project. However, you must apply Explainable AI (XAI) practices throughout your code by providing clear explanations and comments for each section to demonstrate your understanding. All prompts used with GenAI must be included at the end of your submission, along with a short reflection on what worked, what did not, and any changes you made to the AI-generated outputs. Remember, while AI can assist you, your explanations, understanding, and application of the concepts will be assessed.
C++ Practical Project: Transport Connectivity in Southern Africa
Project Brief
Southern Africa Transport Graph
------------------------------------------------------
Cities: City1 (C1), City2 (C2), City3 (C3), City4 (C4), City5 (C5) {Replace these with actual city names and valid distances}
Adjacency Matrix (Distances in km):
C1 C2 C3 C4 C5
C1 [0, 400, 0, 0, 400]
C2 [100, 0, 200, 0, 0]
C3 [0, 200, 0, 300, 0]
C4 [0, 0, 300, 0, 250]
C5 [400, 0, 0, 250, 0]
BFS Traversal starting from C1:
C1 -> C2 -> C5 -> C3 -> C4
Dijkstra’s Shortest Path from C1 to C4:
Path: C1 -> C2 -> C3 -> C4
Total distance: 600 km
Instructions for upload
IMPORTANT
Files that do not follow the required naming format (studentNumber_As3.cpp) – for example, if your student number is 12345678, your file should be named 12345678_As3.cpp – will not be marked, and you will receive 0% for this submission.
Additionally, any code submission that does not include your student details (Name, Surname, and Student Number) within the code comments will also not be marked, and a mark of 0% will be awarded.
Furthermore, your code must follow Explainable AI (XAI) practices as prescribed in the task instructions. Submissions that do not include clear explanations and comments demonstrating your understanding will not be marked, as explainability forms a critical part of your assessment.
maybe you guys.
Assignment 3:
Tomorrow, 11:00 PM
Course event
189232
Do not attempt this project before you have completed the lessons in Class 3 as well as the Self Assessments 2, 3 and 4.
Note on GenAI and XAI Usage: You are encouraged to use Generative AI tools (GenAI) to assist you in this project. However, you must apply Explainable AI (XAI) practices throughout your code by providing clear explanations and comments for each section to demonstrate your understanding. All prompts used with GenAI must be included at the end of your submission, along with a short reflection on what worked, what did not, and any changes you made to the AI-generated outputs. Remember, while AI can assist you, your explanations, understanding, and application of the concepts will be assessed.
C++ Practical Project: Transport Connectivity in Southern Africa
Background
Southern Africa’s development relies heavily on interconnected transport routes, including roads between cities and towns across countries such as South Africa, Namibia, Botswana, Zimbabwe, and Mozambique. Efficient transport planning requires understanding these connections, visualising them, and performing traversals to determine reachability and optimal routes.Project Brief
You are tasked to develop a Graph-based program in C++ that models a simplified transport network of Southern Africa. Your program should:- Represent cities/towns as vertices and roads as weighted edges (distances).
- Allow input of connections using adjacency lists and display the adjacency matrix representation.
- Implement Breadth-First Search (BFS) to show reachable cities from a selected starting city.
- Implement Dijkstra’s algorithm to find the shortest distance and path between any two selected cities.
- Display the graph structure clearly, labelling each city.
- Follow Explainable AI (XAI) coding practices: comment thoroughly to explain each logical section to a non-programmer.
Graph Representation (10 marks)
- Define the graph using an adjacency list that includes weights (distance between cities).
- Display the equivalent adjacency matrix with weights clearly formatted for readability.
- Hardcode at least 5 cities with realistic names (e.g., Windhoek, Gaborone, Johannesburg, Harare, Maputo).
- Define roads (edges) between them representing possible direct routes with realistic distances.
- Implement a function to perform BFS traversal starting from any specified city.
- Display the order of visiting cities to show reachability.
- Implement Dijkstra’s algorithm to find the shortest path and distance between any two selected cities.
- Display the shortest distance and the sequence of cities on the shortest path.
- Print a clear, user-friendly output showing connections between cities, including distances.
- Insert comments explaining:
- Each variable and data structure used
- Each function’s purpose
- How adjacency lists, BFS, and Dijkstra’s algorithm work in your program
- At the end of your .cpp file, include:
- All Gen AI prompts you used
- A short reflection (5-10 lines) on what worked well with AI, what failed, and what you had to adjust
Southern Africa Transport Graph
------------------------------------------------------
Cities: City1 (C1), City2 (C2), City3 (C3), City4 (C4), City5 (C5) {Replace these with actual city names and valid distances}
Adjacency Matrix (Distances in km):
C1 C2 C3 C4 C5
C1 [0, 400, 0, 0, 400]
C2 [100, 0, 200, 0, 0]
C3 [0, 200, 0, 300, 0]
C4 [0, 0, 300, 0, 250]
C5 [400, 0, 0, 250, 0]
BFS Traversal starting from C1:
C1 -> C2 -> C5 -> C3 -> C4
Dijkstra’s Shortest Path from C1 to C4:
Path: C1 -> C2 -> C3 -> C4
Total distance: 600 km
Instructions for upload
- Save your .cpp file as studentNumber_As3.cpp, e.g. 12345678_As3.cpp. (No spaces - no names - no funny characters).
- Submit ONE .cpp file only. No external files or headers.
- Include your full name and student number as comments at the top.
- Ensure your code compiles and runs without external dependencies.
- Use only standard C++ libraries.
- Use clear XAI explanations throughout your code.
- Label the reflection section clearly at the end of your file.
Files that do not follow the required naming format (studentNumber_As3.cpp) – for example, if your student number is 12345678, your file should be named 12345678_As3.cpp – will not be marked, and you will receive 0% for this submission.
Additionally, any code submission that does not include your student details (Name, Surname, and Student Number) within the code comments will also not be marked, and a mark of 0% will be awarded.
Furthermore, your code must follow Explainable AI (XAI) practices as prescribed in the task instructions. Submissions that do not include clear explanations and comments demonstrating your understanding will not be marked, as explainability forms a critical part of your assessment.