Prompt to control and test your implementation

Assignment Help C/C++ Programming
Reference no: EM133694192

Data Structures

Purpose
To measure the student's ability to implement and/or use a linked list structure to solve an underlying problem in C++.

Overview
This assignment will test your ability to implement and use a linked list data structure to implement a (simulated) web browser. This browser will allow users to visit and navigate a history of websites visited, along with maintain a list of bookmarked favourite sites, using a linked list.

You will be provided with a main program that includes a menu and prompt to control and test your implementation. Additionally, the main program will be able to run a list of commands from a file. You will also be provided with appropriate header files and a makefile, leaving you to implement only the Node, LinkedList, and Browser classes.

The Supplied Files
This section gives an overview of the files that you are provided as part of this assignment. There are quite a few, so you are recommended to take some time to understand the overall structure of the program.

main.cpp - contains the main function and other functions that allow you to interactively test the functions you implement in playlist. This file should not be modified.
node.h - contains the header for the Node class, which includes the instance variables and behaviours that your node should contain. This file should not be modified.

node.hpp - contains (skeleton) template implementations for the Node class. This is where your implementation of the node is to be completed. This file should be modified and be part of your submission.

linked_list.h - contains the header for the LinkedList class, which includes the instance variables and behaviours that your linked list should contain. This file should not be modified.

linked_list.hpp - contains (skeleton) template implementations for the LinkedList class. This is where your implementation of the linked list is to be completed. This file should be modified and be part of your submission.

browser.h - contains the header for the Browser class, which includes the instance variables and behaviours that your browser should contain. This file should not be modified.

browser.cpp - contains (skeleton) implementations for the Browser class. This is where your implementation of the browser is to be completed. This file should be modified and be part of your submission.
makefile - the makefile for the project, which outlines the build recipe. The -g flag is set for you to make debugging and/or memory leak detection more convenient, should you wish to use these tools. This file should not be modified.

TestCommands.txt - a text file containing a sequence of commands that can be used to run the program in file mode. This is simply a text file with valid commands, one per line. This file is not really part of the program so you may modify if you wish.

Running the Program
Of course, you will need to ensure the program is compiled prior to running it. You can use the supplied makefile for this - it will produce an executable called Browser.

Note: while the initial code you have been supplied will compile, it will produce a compiler warning (see Figure 1). In this case, the warning is indicating that we have a method expecting a reference to be returned, but we have not returned anything. In fact, all the methods you are meant to implement are either empty or return default values - you are provided only with a skeleton of the final program and are expected to complete the required implementations.

The program will operate in two different modes: prompt (interactive) mode and file mode, each described below. In prompt mode, the user is presented with a prompt to enter commands in sequence. In file mode, the user can supply a text file, which contains a list of commands that will be executed - this can be used to test a particular sequence of commands without having to type them every time.

Important Notes: The program does not validate web addresses. The program is also not equipped to handle spaces in the web address provided. Rather, the program interprets spaces as the separator character between different command arguments. If you wish to supply your own data, ensure that you do not include spaces in web addresses.

Prompt (Interactive) Mode
To run in prompt mode, the program should be executed as normal using the command:

./Browser

When the program is first run, you will be presented with a welcome message and a prompt. The prompt will allow you to enter commands to interact with your browser. Initially, the program will run, but not successfully given that you will not have implemented the functionality. However, you are recommended to have a look through the code, particularly the header files, to better understand the requirements for the various methods you must write.

Figure 2 shows the list of commands that the program can interpret and execute. The parsing and execution of these commands is handled in the main file. Thus, your concern is only to implement the underlying functionality to provide the intended behaviour.

Figure 3 shows an example of the program operating in prompt mode, where the user has entered the commands listed after the prompts Enter Command:.

File Mode
To run in file mode, the program will be executed with an argument containing the name of the file. To run in file mode, the program will be executed as:

./Browser TestCommands.txt

The list of commands in the supplied TestCommands.txt is minimal and does not run an exhaustive set of tests. However, you may supply the path to any text file as the argument. In fact, you are encouraged to develop your own set of tests, which may be easiest to do with a preset list of commands in a text file.
Note: Executing the program in file mode should produce the exact same output as running the corresponding commands, in sequence, in prompt mode.

Figure 4 shows an example of the program operating in file mode, where the user has supplied the default TestCommands.txt file. Note: this figure does not show the entirety of the output, only a sample.

The Tasks
Your tasks can be summarised as the implementation of three classes, namely Node, LinkedList, and Browser. For each class, you are provided with the header file and skeleton implementations (i.e., method stubs that allow the program to compile, but are otherwise non-

functional). You are not permitted to change the supplied header files and must implement all methods listed in the header files, irrespective of whether they are used in the program.

Node
The Node class is a templated version of a node object and should be implemented as discussed in the lectures. For a full list of methods required and some important details, you should examine the node.h file and its associated documentation.

LinkedList
The LinkedList class is a templated version of a doubly linked list using two sentinel nodes and should be implemented as discussed in the lectures. For a full list of methods required and some important details, you should examine the linked_list.h file and its associated documentation.

Browser

The Browser class contains the main logic of the browser and uses your LinkedList class to supply the underlying functionality. That is, this class must use the public interface provided by your LinkedList class to perform the various operations that support the list of commands given in Figure 2. You are not permitted to use std::list or any other collection in the std namespace. For a full list of methods required and some important details, you should examine the browser.h file and its associated documentation.

Marking
As mentioned previously, this assignment is worth 100 marks and accounts for 15% of your final grade. Late submissions are subject to the rules specified in the Course Outline.
Your submission will be assessed on both correctness and quality. This means, in addition to providing a correct solution, you are expected to provide readable code with appropriate commenting, formatting, best practices, memory management, etc. Code that fails to compile will result in a zero for the functionality correctness section. Your code may be tested on functionality not explicitly shown in the supplied demo file (i.e., using a different main.cpp file). Hence, you are encouraged to test broader functionality of your program before submission.

Reference no: EM133694192

Questions Cloud

Implement the tasks using oracle application : CSE2/4DBF Database Fundamental, La Trobe University - Implement the following tasks using ORACLE Application Express (APEX). Download the file NEASchema.sql
Demonstrate your understanding of language and communication : ECE6011 Languages of Children, Victoria University Design, prepare and present 3 x Invitations to Play drawing on content of the unit material and journal
What is the importance of cultural and heritage management : RIICWD535E Prepare detailed design of civil timber structures, and What is the importance of cultural and heritage management in designing civil timber
Develop a new interactive system : 32555 Fundamentals of Software Development, University of Technology Sydney, develop a new interactive system. The system should offer access to two interactive
Prompt to control and test your implementation : Implementation of three classes, namely Node, LinkedList, and Browser. For each class, you are provided with the header file and skeleton implementations
Analyse and solve computing problems : COSC2804 Programming Studio, RMIT University - Analyse and solve computing problems; design and develop suitable algorithmic solutions; implement and debug
Fitted sarima models to the two time series : Fitted SARIMA models to the two time series, Data-driven Decision Making and Forecasting - Compare fitting a SARIMA model to fitting an ARMA model to residuals
Obtained residuals from prophet models : Obtained residuals from Prophet models and provide plots of the time series and predictions, Fitting and evaluating ARIMA and VAR time series models Assessment
Plot of the time series and predictions : Provide the acfs of the residuals, Plot of the time series and predictions and Obtain residuals from Prophet models and fit ARMA models to these residuals

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Create program that uses functions and reference parameters

Create program that uses functions and reference parameters, and asks user for the outside temperature.

  Write a program using vectors and iterators

Write a program using vectors and iterators that allows a user to maintain a personal list of DVD titles

  Write the code required to analyse and display the data

Calculate and store the average for each row and column. Determine and store the values for the Average Map.

  Write a webservices application

Write a webservices application that does a simple four function calculator

  Iimplement a client-server of the game

Iimplement a client-server version of the rock-paper-scissors-lizard-Spock game.

  Model-view-controller

Explain Model-View-Controller paradigm

  Design a nested program

How many levels of nesting are there in this design?

  Convert celsius temperatures to fahrenheit temperatures

Write a C++ program that converts Celsius Temperatures to Fahrenheit Temperatures.

  Evaluate and output the value in the given base

Write C program that will input two values from the user that are a Value and a Base with which you will evaluate and output the Value in the given Base.

  Design a base class shape with virtual functions

Design a base class shape with virtual functions

  Implementation of classes

Implementation of classes Chart and BarChart. Class barChart chould display a simple textual representation of the data

  Technical paper: memory management

Technical Paper: Memory Management, The intent of this paper is to provide you with an in depth knowledge of how memory is used in executing, your programs and its critical support for applications.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd