Can someone help me with this? I added the incomplete c++ code at the bottom of the instructions. Can anyone fix this?
Instructions In this activity, we will extend the functionality of a class called "Date" using inheritance and polymorphism. You will be provided the parent class solution on Canvas, which includes the definition of this class. Currently, the Date class allows users of the class to store a date in month/day/year format. It has three associated integer attributes that are used to store the date as well as multiple defined operations, as described below: setDate-allows the user of the class to set a new date. Note that there is NO date validation in this definition of the method, which is a problem you will solve in this activity. getDate/Month/Year-a trio of getter methods that allow you to retrieve the day/month/and year number from the object. toString - a getter method that generates a string containing the date in "MM/DD/YYYY" format. Your task in this activity is to use inheritance to create a child class of the Date class called "DateExt". A partial definition of this class is provided to you on Canvas to give you a starting point. This child class will achieve the following: 1. Redefine the "setDate" method so that it does proper date validation. This method should return true or false if successful. The date should ONLY be set if the following is valid: a. The month is between 1 and 12. b. The day is valid for the given month. i. ii. I.e., November 31st is NOT valid, as November only has 30 days. Additionally, February must respect leap year rules. February 29th is only valid IF the year given is a leap year. To achieve this, you may need to create additional utility methods (such as a leap year method, for example). You can decide which methods you need. 2. Define additional operations: a. formatSimple-Outputs the date similar to toString, but allows the user to choose the separator character (i.e., instead of "/" they can use "-" to express the date). b. formatWorded-Outputs the date as "spelled out." For example: 3/12/2021 would be "March 12, 2021" if this method is called. i. For this one, you might consider creating a method that uses if statements to return the name equivalent of a month number. Once you are finished, create a test file to test each method. Create multiple objects and assign them different dates. Make sure to pick good dates that will test the logic in your methods to ensure no errors have occurred. Ensure that setDate is properly calling the new definition, as well as test the new operations. Submit your Date Ext definition to Canvas once you are finished. #pragma once #pragma once #include "Date.h" class DateExt :public Date { public: //This calls the parent class's empty constructor. //and then we call the redefined setDate method //in the child constructor. //Note that you do NOT have to modify the constructor //definitions. DateExt(int d, int m, int y) : Date() setDate(d, m, y); { DateExt(): Date() day = -1; month = -1; year = -1; { //Since the parent method "setDate" is virtual, //we can redefine the setDate method here. //and any objects of "DateExt" will choose //this version of the method instead of the parent //method. //This is considered "Run Time Polymorphism", which //is a type of polymorphism that occurs at runtime //rather than compile time(function/operator overloading //is compile time polymorphism). void setDate(int d, int m, int y) { /* Redefine setDate here...*/ /* Define the rest of the operations below */ private: /* Define any supporting/utility methods you need here */

Answers

Answer 1

The provided C++ code is incomplete and contains errors. It aims to create a child class called "DateExt" that inherits from the parent class "Date" and extends its functionality.

To fix the code, you can make the following modifications:

Remove the duplicate "#pragma once" statement at the beginning of the code.

Ensure the class declaration for "DateExt" inherits from "Date" using the ":" symbol.

Correct the constructor definition for "DateExt" by removing the semicolon after "Date()" and adding a constructor body.

In the "DateExt" constructor body, call the redefined "setDate" method instead of the parent's "setDate" method using the "->" operator.

Add missing curly braces to close the "DateExt" class and the "setDate" method.

Implement the "setDate" method in the "DateExt" class, performing proper date validation based on the given requirements.

Define the additional operations, "formatSimple" and "formatWorded," as mentioned in the instructions.

Add any necessary supporting/utility methods to assist in date validation and other operations.

After making these modifications, you should be able to test the functionality of the "DateExt" class and its methods to ensure proper date validation and formatting. Remember to create a test file to instantiate objects of the "DateExt" class and verify the correctness of the implemented methods.

Note: The specific implementation details and logic for date validation, formatting, and supporting methods will depend on your design choices and requirements.

Learn more about C++ code : brainly.com/question/28959658

#SPJ11


Related Questions

Which type of free software contains embedded marketing material within the program?

shareware

freeware

Spyware

adware

Answers

Adware is the answer

Why won't my brainly account level up?

Answers

Well, you need to have 5 brainiest answers plus 500 points. So, in order to level up in brainly you need 500 plus 5 brainiest.

What is brainly?

Brainly is a Polish company with headquarters in New York City. It is a social learning platform where millions of students and teachers work together to solve academic problems. The mission of Brainly is to encourage students to share and explore knowledge in a collaborative environment.

It can also be used to ask and answer homework questions by students, parents, and teachers. The platform includes n elements such as points and ranks. It encourages users to participate in the online community by answering questions posted by other users. Brainly reported 350 million monthly users as of November 2020, making it the most popular education app in the world.

Learn more about level up

https://brainly.com/question/7853380

#SPJ1

Answer:

This is because to level up, you need a certain number of points and brainliest answers! To get this you can always keep answering questions to get your points up and whenever you complete an answer which is superior than any other, the user may choose to give you brainliest!

Hope this helps, have a lovely day! :)

You can typically set how aggressive the spam filter is in terms of blocking messages. To do so you should configure sender ____________ and ________________

Answers

To configure how aggressive the spam filter is in terms of blocking messages, you should typically configure two settings: "sender reputation" and "spam threshold."

What is the spam filter?

Sender Reputation is one that establish trust or not based on sender history. Create a trusted sender list and block known spammers by reputation. Set the spam threshold for filter sensitivity.

Lowering threshold increases spam catch but may lead to false positives, raising it may risk spam in inbox. Sender rep  and threshold tuning balances filtering between blocking spam and not flagging legit emails.

Learn more about spam filter from

https://brainly.com/question/29413993

#SPJ1

por que se dice que las TIC´S son las integracion de las TI y las TC?

Answers

La respuesta correcta para esta pregunta abierta es la siguiente.

A pesar de que no se anexan opciones o incisos para responder, podemos comentar lo siguiente.

Se dice que las TIC´S son las integración de las TI y las TC porque ambas actividades se han integrado o fusionado en una solo concepto al momento de juntar las herramientas tecnológicas para almacenar, procesar y mandar información a través de los recursos tecnológicos utilizando los canales o recursos de los medios masivas de comunicación como lo son las redes satelitales o las comunicaciones vía microondas.

Al fusionarse las TI (Tecnologías de la Información) con las TC (Tecnologías de Comunicación), se maximiza la capacidad de enviar una mayor cantidad de información al momento a diferentes lugares del planeta.

state three differences between text data and number data​

Answers

Answer:

Strings contain alphanumeric characters. Even if the string contains numbers, they are treated as text. Think of the example of ZIP codes. Two of the most widely used numeric data types are integers, which consist of whole numbers, and decimals, which are also called floats or doubles.

Answer:

Explanation:

text data can be a mixture of alpha numeric data (has both letters and numbers). This can be in the form of print or speech

number data is just numbers.

In teaching the antonyms and synonyms of a word such as generosity, a teacher would be emphasizing which aspect of language?.

Answers

In teaching the antonyms and synonyms of a word such as generosity, a teacher would be emphasizing the vocabulary of the language.

What is synonyms?

This article discusses "synonym's" definition in its broadest sense. See Synonym for other usage. A term, morpheme, or phrase that in a particular language has the exact same meaning as another term, morpheme, or phrase is said to be a synonym. For instance, the words begin, start, commence, and begin are all synonyms of one another in the English language; they are interchangeable. A sentence's ability to retain its meaning when one form is substituted for another is the traditional test for synonymy. Words are only considered synonymous in a single context; for example, long and extended can both be used to mean lengthy time or extended time, but long cannot be used to mean wider family.

to learn more about synonyms
https://brainly.com/question/76433
#SPJ4

Compare two processors currently being produced for personal computers. Use standard industry benchmarks for your comparison and briefly list the advantages and disadvantages of each. You can compare different processors from the same manufacturer (such as two Intel processors) or different processors from different manufacturers (such as Intel and AMD).

Answers

Answer:

The intel core i7 and core i9

advantages;

- The core i7 and core i9 have maximum memory spaces of 64GB and 128GB respectively.

- They both support hyper-threading.

- core i7 has 4 cores and 8 threads while the i9 has 8 cores and 16 threads.

- The maximum number of memory channels for i7 and i9 are 3 and 4 respectively.

- The Base frequencies of core i7 and i9 are 1.10GHz and 3.00GHz respectively.

demerits;

- High power consumption and requires a high-performance motherboard.

- Costly compared to earlier Intel processors

- They do not support error correction code memory, ECC

Explanation:

The intel core i7 and i9 processors are high-performance processors used in computing high-resolution graphics jobs and in processes where speed is required. This feature makes these processors flexible, to be used in most job types.

Note that computers with these processors are costly, must have and be upgraded with a DDR3 RAM chip, and consumes a lot of power to generate high-performance.

What are the advantages of using raid level 5 over other types of raid?

Answers

RAID level 5 offers several advantages over other types of RAID, including improved performance, fault tolerance, and efficient use of storage capacity.

In RAID level 5, data is distributed across multiple disks along with parity information. The main advantages of RAID level 5 are its improved performance and fault tolerance. By distributing data and parity across multiple drives, RAID 5 allows for simultaneous read and write operations, resulting in faster data access and improved overall performance. In terms of fault tolerance, RAID 5 can withstand the failure of a single disk without losing data. The parity information enables data recovery by reconstructing the missing information from the remaining drives. Additionally, RAID level 5 offers efficient use of storage capacity by utilizing distributed parity, which optimizes space utilization and minimizes storage overhead.

Learn more about RAID level 5 here:

https://brainly.com/question/33570440

#SPJ11

this is a pictorial way of representing knowledge. it is used to help organize ideas and present information.

Answers

This is a description of a concept known as a concept map or mind map. It is a visual tool that is used to organize and present information in a hierarchical structure, with the main idea in the center and branches representing related concepts.

Mind map is often used in education and problem-solving to help students and professionals understand and organize complex information. A mind map is a type of visual tool used to organize and present information in a hierarchical structure. It typically starts with a central idea or concept, represented by a word or image, with branches or lines connecting to related ideas and sub-ideas. Mind maps are often created using diagrams and images, and they can be used to organize ideas, plan projects, take notes, or brainstorm solutions to problems. Mind maps are widely used in education and business for visualizing, structuring, and brainstorming ideas. It's also an effective tool for memory and idea recall.

Learn more about Mind map here: https://brainly.com/question/29506148

#SPJ4

Assume that a dictionary called zip_dictionary has already been created and filled that maps a zip code (an integer) to the corresponding location (a string). write code that assigns the location for zip code 90028 to the variable location.

Answers

To assign the location for zip code 90028 to the variable `location` using the given `zip_dictionary`, you can use the following code:
location = zip_dictionary[90028]


This code retrieves the value associated with the key `90028` from the `zip_dictionary` and assigns it to the variable `location`. This code makes use of the .get() method in Python dictionaries. The .get() method takes a key (in this case, the integer 90028 representing the zip code) and returns the corresponding value (in this case, the string representing the location) from the dictionary. If the key is not found in the dictionary, the .get() method returns None by default. So in this case, location will be assigned the string corresponding to the zip code 90028 if it exists in the zip_dictionary, or None if it doesn't.

To learn more about key; https://brainly.com/question/24906199

#SPJ11

The less momentum an object has, the easier it is to stop. True or False

Answers

Answer:

True

Explanation:

A user tells a help desk technician that their browser is displaying a message that a site can't be
reached. When asked, the user tells the technician that other users in the same office can browse to the site. The technician suspects that the web server's name is not being translated to the correct IP address. The technician asks the user to open a command prompt window.
Which of the following commands would confirm the technician's assumption? (Select TWO).
A. netdom
B. ipconfig
C. nslookup
D. ifconfig
E. ping

Answers

Answer:

C. nslookup

E. ping

Explanation:

The two commands that would confirm this assumption would be nslookup and ping. The command nslookup will show you a mapping of the DNS and the IP address, this includes the name server and how it is being translated to the correct IP address. The ping command will send a small piece of data to the IP address of the website that you are trying to access and listen back for a response. If a response is received it means that the website was reached correctly and is fully operational. Both of these commands combined will allow you to determine whether the technician's assumption was correct.

Most cell phones and tablets have solid-state storage drives. internal hard disk drives. internal cloud storage. external hard disk drives.

Answers

Answer:

internal hard disc drives

Explanation:

most common in mobile devices second is solid-state drives

help our cause by spreading this flag all over Brainly

Most cell phones and tablets have solid-state storage drives. internal hard disk drives. internal cloud

Most cell phones and tablets have solid-state storage drives. Therefore, option (A) is correct.

What are cellphones?

Cellphones, also known as mobile phones or simply "cell," are portable electronic devices used for wireless communication. They allow people to make and receive phone calls and text messages, access the internet, and use various applications. Cellphones use radio waves to communicate with cell towers or base stations, which then connect to a wired network, enabling users to communicate with others from virtually anywhere.

The first cellphone was invented in 1973 by Martin Cooper, who was working for Motorola at the time. It was a bulky device that weighed 2.5 pounds and cost over $3,000. Since then, cellphones have become increasingly smaller, lighter, and more affordable, and are now an essential part of everyday life for many people around the world.

Learn more about cell phones, here:

https://brainly.com/question/28925342

#SPJ2

why can’t the pm use the organization’s current information system for project monitoring and reporting?

Answers

PM needs to provide regular updates to stakeholders who require concise and actionable information. In such cases, the PM may have to invest in a dedicated system that is specifically designed for project monitoring and reporting.

There are several reasons why the project manager (PM) may not be able to use the organization’s current information system for project monitoring and reporting. These reasons are discussed below:Lack of Compatibility:One of the primary reasons why the PM may not be able to use the organization’s current information system is due to a lack of compatibility between the system and the project’s requirements.

The current system may not have the necessary features or functions to monitor and report on the project’s progress. As such, the PM may have to invest in a new system that is specifically designed for project monitoring and reporting.Cost:The cost of purchasing and implementing a new system can be a significant obstacle for many organizations. Even if the current system is not suitable for the project’s needs, the organization may be unwilling or unable to invest in a new system.

To know more about stakeholders  visit:-

https://brainly.com/question/30241824

#SPJ11

A sequence of instructions that solves a problem is called a. an algorithm b. graphics c. an allegory d. a process

Answers

Answer:A: an algorithm

Explanation: I hope this helps!

What will you see on the next line?

>>> int(5.6)

Answers

If you input int(5.6) you will see 5 on the next line.

LMK ASAP PLEASE
what is the name of the concept that programmers use to be able to make decisions in programming?

A. parameters
B.procedures
C.conditional statements D.arguments

Answers

Answer: I belive the answer to be (C)

Explanation:

shoppinglist is an oversize array of items to be purchased. which method call should be used to add an item?

Answers

Without an INC file, test cases utilizing dynamic object recognition can also be written manually. The method call that should be used to add an item is: addItem(shoppingList,item)

What is method call?

A routine that is applicable to a certain class of objects is called a method. When calling methods on an object, you can refer to it by its identifier after it has been declared.

The Find dialogue box's SetActive method is invoked in the following example:

                                            Find.SetActive ()

A special identifier for dynamic instantiation can be used to call methods for a window that hasn't yet been declared. Whether or not you use INC files affects the syntax.

In order to generate scripts that use dynamic object recognition and window declarations, Silk Test Classic creates locator keywords in an INC file when you record a test case with the Open Age.

Learn more about method call :

brainly.com/question/18567609

#SPJ4

True/False: The speed and amount of memory available to modern computers diminishes the performance impact of the overhead of recursion so much that for many applications, this overhead is not noticeable.

Answers

 The speed and amount of memory available to modern computers diminishes the performance impact of the overhead of recursion so much that for many applications, this overhead is not noticeable.

 Recursion refers to a programming technique where a function calls itself. While recursion can be a powerful tool, it also comes with certain overhead. This overhead includes the additional memory required to store function calls and the extra time spent managing the recursive calls.

Although modern computers have faster processors and larger amounts of memory compared to older machines, the overhead of recursion can still impact performance. The overhead becomes more noticeable when dealing with recursive algorithms that involve a large number of function calls or require significant memory usage.

To know more about computers visit:

https://brainly.com/question/33946445

#SPJ11

Can anyone help with this

Can anyone help with this

Answers

a) Cost: However, HDDs are a lot cheaper. In terms of price for each GB of storage, the SSD is much more costly than the HDD. SSD costs twice as much as HDDs for an identical storage capacity. This means that computers with solid-state drives will be much more expensive than those with traditional hard drives
b) Hard Disk
c) Solid state drives (SSD)

You want to make sure that all users have passwords over eight characters in length and that passwords must be changed every 30 days. What should you do

Answers

Answer:

Configure account policies in Group policy.

Explanation:

To generate integers between and including -10 to 10 you would use:


random.randint(-10, 10)


random.random()*20 + -10


random.random(-10, 10)


randint(-10, 10)


I will give Brainliest

Answers

Answer:

random.randint(-10,10)

Explanation:

anaconda is an installation program that's used by fedora, rhel, and other distributions. which of the following does anaconda perform? (select three.

Answers

Identifies the computer's hardware, Creates a file system and Provides a user interface with guided installation steps does anaconda perform.

What a user interface means?

The user interface of a device is the point of interaction and communication between humans and computers. Desktop monitors, keyboards, mice, and other pointing devices may fall under this category. It also describes how a user interacts with a website or program.

The user interface is the point of interaction and communication between people and computers on a gadget, website, or app. Desktop graphics, keyboards, mice, and display screens are a few examples of this.

Thus, the options are written.

For more information about user interface, click here:

https://brainly.com/question/15704118

#SPJ1

A speed limit sign that says "NIGHT" indicates the _____ legal speed between sunset and sunrise.

Answers

Answer:

Maximum

Explanation:

Speed limits indicate the maximum speed you are legally allowed to drive.

During active listening, which response is NOT an example of providing feedback to the speaker to show that you understand his or her thoughts?
A.
nodding your head
B.
turning your back to the speaker
C.
saying, "You're saying that his reaction made you feel appreciated?"
D.
saying, "Sorry to interrupt, but can you explain that part again?"

Answers

Answer:

The answer is D.

Explanation:

They/you are asking the speaker to clarify what they just said.

Answer:

B. turning your back to the speaker

Explanation:

Which of the following statements correctly creates a Scanner object for keyboard input? Scanner kbd new Scanner(System.keyboard: Scanner mykeyboard - new Scanner(System.ink Scanner keyboard(System.in: Keyboard scanner = new Keyboard(System.in

Answers

The correct statement that creates a Scanner object for keyboard input is: Scanner keyboard = new Scanner(System. in).

To create a Scanner object for keyboard input in Java, we use the "new Scanner(System. in)" syntax. The "System. in" parameter represents the standard input stream, which is typically associated with keyboard input. By assigning this to a Scanner object named "keyboard", we can use methods like "nextInt()", "nextLine()", etc., to read input from the keyboard.

In the given options:

"Scanner kbd new Scanner(System. keyboard" is incorrect syntax. There is a missing assignment operator (=) between "kbd" and "new Scanner(System. keyboard)".

"Scanner my keyboard - new Scanner(System. ink" is incorrect syntax. There is a typo with the subtraction symbol (-) instead of the assignment operator (=) after "my keyboard".

"Scanner keyboard(System.in: Keyboard scanner = new Keyboard(System.in" is incorrect syntax. The colon (:) after "keyboard(System.in" is incorrect, and the class name "Keyboard" does not correspond to the Scanner class in Java.

learn more about scanner here; brainly.com/question/30893540

#SPJ11

Which two protocols work at the transport layer and ensures that data gets to the right applications running on those nodes?Internet Protocol (IP)User Datagram Protocol (UDP)Transmission Control Protocol (TCP)Dynamic Host Configuration Protocol (DHCP)

Answers

The two protocols that work at the transport layer and ensure that data gets to the right applications running on those nodes are the User Datagram Protocol (UDP) and the Transmission Control Protocol (TCP).

Protocols

Both UDP and TCP operate at the transport layer and are responsible for managing data communication between nodes. They provide different levels of reliability and communication methods but serve the same purpose of ensuring data reaches the correct application. The Internet Protocol (IP) operates at the network layer, while the Dynamic Host Configuration Protocol (DHCP) operates at the application layer.

Transport layer

In the OSI model, the transport layer is present as 4 th layer from the top. The transport layer's role is to provide communication services directly to the application processes running on different hosts. It provides logical communication between an application that is running on different hosts.

To know more about the application layer visit:

https://brainly.com/question/31577381

#SPJ11

what is desktop live wallpaper in windows 10? do i need it

Answers

Answer:

It's just moving wallpaper for your computer.

Explanation:

If you've been asked to put it on then yeah but its only wallpaper.

Answer:

Its a moving wallpaper

Explanation:

You dont need it unless u need to have it

A customer seeks to buy a new computer for a private use at home.The customer primarily needs the computer to use the Microsoft PowerPoint application for the purpose of practice presentation skills.As a sales person what size hard disc would you recommend and why?

Answers

Answer:

The most common size for desktop hard drives is 3.5 inches,  they tend to be faster and more reliable, and have more capacity. But they also make more noise.

Explanation:

If you are continually deleting and installing programs or creating content, the disc must have good reliability.

Keep in mind that larger hard drives are also a little slower, so it is preferable to opt for two smaller ones. Large hard drives are partitioned so there is no problem gettin

chbdg good performance, but if you put everything on one big disk and it breaks, you will lose everything.

If you buy 2 small disks, check that the motherboard does not limit the speed of a second hard disk.

can someone help: how to get binary?

Answers

Answer:

Explanation:

SENN KİMSİİİİİİİİN???

Answer:

to convert interior to binary start with the integers in question and divide two notice of the quotient and the remainder continue dividing the quotient by 2 until you get question of zero then just write out the remains in the rivers order

Other Questions
During January, the production department of a process operations system completed and transferred to finished goods a total of 59,000 units. At the end of January, 12,000 additional units were in process in the production department and were 45% complete with respect to conversion. The beginning inventory included conversion cost of $39,200 and the production department incurred conversion costs of $311,100 during January. Compute the cost per equivalent unit for conversion for the department using the weighted-average method? Ms. Miller buys 250 crayons for her class and wants to divide the crayons equally among her 19 students. To the nearest whole crayon, about how many crayons can Ms. Miller give to each of her students? The first three terms of an arithmetic sequence are u1=3k1, u2=4k+1, and u3=6k2. What is the value of k? Sandhill Limited needs to set aside cash for the replacement of a robot in its assembly line 10 years from today. Sandhill will earn 8% on the cash it will set aside. Sandhill needs to know how much it should set aside at the end of each year to accumulate $645,000. Calculate the amount Sandhill needs to invest at the end of each year to replace the robot 10 years from today. (For calculation purposes, use 5 decimal places as displayed in the factor table provided. each example of rock weathering can be categorized as either physical weathering or chemical weathering. drag each item to the correct location. Consider an asset that costs $1,126,113 and is depreciated straight-line to zero over its 14-year tax life. The asset is to be used in a 6-year project; at the end of the project, the asset can be sold for $165,581. If the relevant tax rate is 0.28, what is the aftertax cash flow from the sale of this asset (SVNOT)? Which of these cells contain spirals of lignin?a. Palisade cellsb. Bacterial cellsc. Yeast cellsd. Xylem cells 3. Coloca en el grupo correspondiente los siguientes nmeros positivos y negativos. +6, -5, -1. 5, -, *), +8, -6, -8, -0,3NmerosNumeros negativosNmeros positivos0Naturales6. The perimeter of a rectangular carpet is 94 yards. Its width is 19 yards.How long is the carpet?label required Which situation best illustrates how command economies meet their citizens' needs for employment and income? A businessman borrowed P9000 from a bank to fix his car. The bank charges 7% simple interest per year.What is the total amount that the businessman has to pay the bank after two years? why was the south dependent on the north and europe for non-agricultural goods? Find the slope of table PLEASEEEEEEEEEE HELPPPPPP MEEEE You are the manager/owner of a local coffee house. a. What are the outputs of your coffee house? b. What are the activities required to produce the output?c. what are the inputs? Explain how the Cold War differed from prior wars.(19 points) which retailer should each dealer choose for its purchase? Use matrix multiplication. The courts frequently use the "reasonable person" or "reasonability" standard when reviewing cases. When a court reviews an administrative agencys interpretation of law, this is called thestrict scrutiny standardappellate standardChevron standardnotice-and-comment rule making standard Calculate the standard enthalpy change of reaction for b. 4HNO3(g) + 2H2O(g) 2N2H4(g) + 7O2(g) The market value of a home is $311,000. The assessed value is x dollars. The annual property tax rate is a dollars per$1,000 of assessed value. Express the semiannual property tax bill algebraically.