Question

CODE MUST BE IN PYTHON 3

The objective of this lab is to solve problems using the Stack ADT Q1. Write a program that uses the Stack implementation given to you browser has both a back and a forward button which allows the user to in Stack.py to simulate navigation in a web browser. Every web navigate to previously seen web pages. Your task is to implement this functionality using two Stack objects called forward stack and back stack. The forward stack and navigates the web. The interaction with your program will be a sequence of commands, back stack should be used to store and retrieve the urls as the user either >, <, -, or X. The > and ぐcommands will be used to enter a new url web page. If the user enters the, the computer closes. You can assume the web addresses are always valid .You will not actually have to do any web navigation. You will simply be indicate forward and back, respectively. Thecommand is used to would expect a url address. Finally, if the user enters x, the program keeping track of the current page by outputting the address of the current page between and ]. .There are a few situations you should take care to handle. .First, if a user enters or> without there being a previous or next page to go to, you should output a corresponding error message (as shown in the sample output below) but allow the user to continue browsing Secondly, if a user enters c and then - and then enters a new web address, the users previous browsing history in the > direction should be erased .For example, if a user is on www.google.com, enters, and then enters and then www.yahoo.com, the history of visiting www.google.com should be lost. This means that if the user enters >, this should generate an error message and not www.google.com. This behavior can also be seen below in the sample data. You can also test an actual web browser (specifically Firefox or Chrome) if you feel there is other ambiguity. Also, keep in mind that navigation should start with a home page which we will set as www.facebook.com The interaction should start with the current page being www.facebook.com .

0 0
Add a comment Improve this question Transcribed image text
Know the answer?
Add Answer to:
CODE MUST BE IN PYTHON 3 The objective of this lab is to solve problems using...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Use python 3 to solve: Every web browser has both a back and a forward button...

    Use python 3 to solve: Every web browser has both a back and a forward button which allows the user to navigate to previously seen web pages. Your task is to implement this functionality using two stacks: ·        The input to your program will be a sequence of commands. The ">" and "<" tokens will be used to indicate forward and back, respectively. All other input will be web addresses (you can assume they will always be valid). ·        You...

  • Question 1 ​ A URL is a ____-part addressing scheme a. ​two b. ​four c. ​three...

    Question 1 ​ A URL is a ____-part addressing scheme a. ​two b. ​four c. ​three d. ​one Question 2 ​ A text file that contains HTML tags is called a(n) ____. a. ​server b. ​HTML document c. ​browser d. ​IP address Question 3 ​ A(n) ____ comes into existence as soon as a work is placed into a tangible form. a. ​open-source project b. ​copyright c. ​reproduction notice d. ​lien Question 4 ​ A(n) ____ is a small file...

  • Project Description In this project, you will be developing a multithreaded Web server and a simple...

    Project Description In this project, you will be developing a multithreaded Web server and a simple web client. The Web server and Web client communicate using a text-based protocol called HTTP (Hypertext Transfer Protocol). Requirements for the Web server The server is able to handle multiple requests concurrently. This means the implementation is multithreaded. In the main thread, the server listens to a specified port, e.g., 8080. Upon receiving an HTTP request, the server sets up a TCP connection to...

  • Part 2: Programming with Exceptions In this part of the lab , you will write a...

    Part 2: Programming with Exceptions In this part of the lab , you will write a program that fetches the information stored at a give URL on the web and saves that data to a file. This will also include networking and file operations and partly an exercise in using exceptions. For doing I/O, Java has a pair of nice abstractions: InputStream and OutputStream. These are abstract classes in the package java.io. An InputStream is a place from which you...

  • I had tried to work with the wireshark interface and cannot navigate it due to network problems a...

    I had tried to work with the wireshark interface and cannot navigate it due to network problems and cannot find the question solutions, if any one can help with detailed steps it would be a great help. Wireshark Lab #2: Ethernet In this lab, we'll investigate the Ethernet protocol and the ARP protocol. Before beginning this lab, you'l1 probably want to review sections 6.4.1 (Link-layer addressing and ARP) and 6.4.2 (Ethernet) in the text. RFC 826 (ftp://ftp.rfc-editor.org/in- notes/std/std37.txt) contains the...

  • Description: In this assignment, you will be launching a denial of service attack on a web...

    Description: In this assignment, you will be launching a denial of service attack on a web server. We will be using hping3, a command-line oriented network security tool inside Kali Linux (an advanced penetration testing Linux distribution). Setting up the victim machine Download the Windows XP virtual machine with WebGoat server installed, using the following link. We will use this machine as the victim machine and launch a DoS attack on the WebGoat server.https://drive.google.com/open?id=0BwCbaZv8DevUejBPWlNHREFVc2s Open the victim machine and launch...

  • Could I get some help with the following Task? The program should be implemented in JavaScript and running on Firefox, a web browser independent to operating systems. The client has specified the foll...

    Could I get some help with the following Task? The program should be implemented in JavaScript and running on Firefox, a web browser independent to operating systems. The client has specified the following requirements for the functionality of the program: 1. The program should be running without errors throughout two Phases: Information Gathering and Information Presenting. 2. Information Gathering is to gather the information such as state/territory name, the population and population change over previous year for calculation of APG;...

  • The goal of this first lab was primarily to introduce you to Wireshark. The following questions...

    The goal of this first lab was primarily to introduce you to Wireshark. The following questions will demonstrate that you’ve been able to get Wireshark up and running, and have explored some of its capabilities. Answer the following questions, based on your Wireshark experimentation: 1. List up to 10 different protocols that appear in the protocol column in the unfiltered packet-listing window in step 7 Step 7: After your browser has displayed the INTRO-wireshark-file1.html page, stop Wireshark packet capture by...

  • The first script is validate.sh. This is a simple form validation script that will be used...

    The first script is validate.sh. This is a simple form validation script that will be used to verify the inputs given. Normally, this would be done to validate input from a website or another program before entry into a database or other record storage. In this case, we will keep it simple and only focus on the input validation step. In particular, the script should prompt the user for four values: first name, last name, zip code, and email address....

  • You need not run Python programs on a computer in solving the following problems. Place your...

    You need not run Python programs on a computer in solving the following problems. Place your answers into separate "text" files using the names indicated on each problem. Please create your text files using the same text editor that you use for your .py files. Answer submitted in another file format such as .doc, .pages, .rtf, or.pdf will lose least one point per problem! [1] 3 points Use file math.txt What is the precise output from the following code? bar...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT