Question
C++ You should submit a set of header (.h) and source (.cpp) files Design a class for representing a web URL. To keep this simple,
C++
You should submit a set of header (.h) and source (.cpp) files
Design a class for representing a web URL. To keep this simple, consider a URL only to have ascheme,authority, andpath(you can use the same code you wrote in a previous project). Your class should have a constructor that takes a std::string as a parameter. You should not be able to edit (modify) the URL once it is created. You should have fourgetterfunctions which return the full URL as a string, and each of the three components individually also as strings.
Add a non-member output stream overload for your URL class which takes a const URL reference and prints out the URL information in the following format:
URL: https://example.com/
SCHEME: https
AUTHORITY: example.com
PATH: /
You should submit a set of header (.h) and source (.cpp) files
Design a class for representing a web URL. To keep this simple, consider a URL only to have ascheme,authority, andpath(you can use the same code you wrote in a previous project). Your class should have a constructor that takes a std::string as a parameter. You should not be able to edit (modify) the URL once it is created. You should have fourgetterfunctions which return the full URL as a string, and each of the three components individually also as strings.
Add a non-member output stream overload for your URL class which takes a const URL reference and prints out the URL information in the following format:
URL: https://example.com/
SCHEME: https
AUTHORITY: example.com
PATH: /
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access with AI-Powered Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started