In this assignment, you will update the Weight, Date, YoungHuman, and ArrayList classes from previous homeworks using new ideas that we have discussed in class, and you will create an ChildCohort class extending your ArrayList. Build a driver that will fully test the functionality of your classes and include the driver with your submission. Fix any privacy (and other) errors that were noted in your comments for the previous iteration of this homework. Modify the Weight, Date, and YoungHuman class to implement the Comparable interface. Remember that compareTo takes an Object parameter and you should check to make sure that the object that comes in is actually the correct class for the comparison, as appropriate. (How could the CompareTo method be implemented for YoungHuman

Answers

Answer 1

The assignment requires updating the Weight, Date, YoungHuman, and ArrayList classes from previous homeworks by incorporating new concepts discussed in class. Additionally, a ChildCohort class should be created as an extension of ArrayList. The modified classes should implement the Comparable interface, and the CompareTo method needs to be implemented for the YoungHuman class.

To implement the CompareTo method for the YoungHuman class, we can compare YoungHuman objects based on a specific attribute, such as age or name. The CompareTo method should take an Object parameter, which can be cast to a YoungHuman object for comparison. Within the CompareTo method, we can define the logic for comparing the attribute of the current YoungHuman object with the attribute of the object being passed in. The method should return a negative value if the current object is considered "less than" the passed object, a positive value if it is considered "greater than," and 0 if they are considered equal based on the chosen attribute. This allows for sorting and comparison operations on YoungHuman objects.

To learn more about Comparable interface click here : brainly.com/question/32350960

#SPJ11


Related Questions

How to you convert (both positive and negative integers) denary to Two’s complement and vice versa?

Answers

Answer:

To convert from decimal to binary, one approach is to repeatedly divide by 2 as integer division and write down the remainders from right to left:

example: convert 26 to binary

26 / 2 = 13, no remainder => write down 0

13 / 2 = 6, remainder 1 => write down 1

6 / 2 = 3, no remainder => write down 0

3 / 2 = 1, remainder 1 => write down 1

1 / 2 = 0, remainder 1 => write down 1

So 11010 is your result.

For 2's complement, you have to consider youre entire word size. Let's say you have 8 bit representations, then 11010 is really 00011010.

To get the 2's complement, you invert the binary represenation and add 1:

00011010 => 11100101

11100101 + 1 = 11100110 (understand binary addition for this)

So 11100110 is the binary representation of -26.

You can do this entire sequence in reverse, i.e. subtract one, invert and then go back to the decimal representation:

11010 in decimal is 1·2⁴ + 1·2³+ 0·2²+ 1·2¹+ 0·2⁰ = 26

A homeowner uses a smart assistant to set the house alarm, get packages delivery updates, and set time on the outdoor lights. what are these functions example of?

Answers

Blockchain. Virtualization is a technique that allows you to develop useful services using hardware-bound resources.

5G enables incredibly powerful wireless connectivity to edge computing with low latency and high cellular speed, opening up new possibilities such as autonomous drones, remote telesurgery, smart city projects, and much more. 5G and edge computing allow real-time insights that can be securely analyzed on-site. Logistics: Instead of using the centralized cloud, security analytics can send video camera traffic to an edge site. Security use cases are possible across numerous verticals and can help firms decrease operating costs. Virtualization is a technique that allows you to develop useful services using hardware-bound resources.

Learn more about virtualization here-

https://brainly.com/question/29620580

#SPJ4

HELP PLEASE 100 POINTS

Use the drop-down menus to complete the steps to access the Compact & Repair tool.

1. Open the database.

2. Go to the
✔ Backstage
view.

3. Click Info and then_________
OR
1. Open the database.
2. Click the_____ tab.

3. In the Tools group, click ________
The program then reduces the size of the database.

Answers

Honestly I’m not too sure because I think different models have different steps to use, but I’d guess the second steps... sorry Im not too sure but that is what I think. If you were leaning towards that one then I’d probably go with it.

Answer:

Explanation:

This is for MS Access:

1. Open the database.

2. Go to the

✔ Backstage

view.

3. Click Info and then__Compact and Repair__

OR

1. Open the database.

2. Click the__Database Tools__ tab.

3. In the Tools group, click ___Compact and Repair Database___

The program then reduces the size of the database.

which formula should be entered to calculate the total budget?

which formula should be entered to calculate the total budget?

Answers

Answer:

SUM(A$1:A$3),

Explanation:

A formula is an expression telling the computer what mathematical operation to perform upon a specific value. When referring to computer software, formulas are most often used in spreadsheet programs, such as Microsoft Excel. Using formulas in spreadsheets can allow you to quickly make calculations and get totals of multiple cells, rows, or columns in a spreadsheet.

In the picture below is an example of a Microsoft Excel formula =SUM(A$1:A$3), which adds the total of cells A1, A2, and A3. In this formula, SUM is the function of the formula.

Formula in Microsoft Excel

Tip

Press the shortcut key Shift+F3 to open the Excel Formula or Insert Function window.

Note

A formula is not be seen unless the cell is selected.

which formula should be entered to calculate the total budget?

Which of the following correctly lists the three legs of network security?
A. network, boundary, software
B. Physical, Personnel, System and Network security
C. Physical, personnel, component
D. Physical, network, software

Answers

D: "Physical, network, software" crrectly lists the three legs of network security as physical security, network security, and software security.

Physical security refers to the measures taken to protect the physical infrastructure of a network, such as securing server rooms, controlling access to facilities, and implementing surveillance systems.

Network security involves protecting the network itself from unauthorized access, attacks, and threats. This includes measures like firewall configurations, intrusion detection systems, and encryption protocols.

Software security focuses on securing the software applications and systems used within the network. It involves implementing secure coding practices, regular software updates and patches, and conducting vulnerability assessments.

Therefore, option D, Physical, network, software, is the correct answer.

You can learn more about network security at

https://brainly.com/question/28581015

#SPJ11

What are the most important considerations when comparing computer systems? Check all of the boxes that apply.

the type of mouse
the type of keyboard
computer speed
amount of storage

Answers

C and D



Explanation:




Technology is resulting in strong trade networks, economic development, and social reforms that may be allowing the demographic transition to __.
proceed more rapidly

Answers

Technology is resulting in strong trade networks, economic development, and social reforms that may be allowing the demographic transition to proceed more rapidly.

Technological advancements have had a profound impact on trade networks, economic development, and social reforms, leading to a more rapid demographic transition. The interconnectedness brought about by technology has revolutionized the way businesses operate, enabling them to engage in global trade more efficiently. The internet and digital platforms have facilitated seamless communication and streamlined supply chains, resulting in stronger trade networks. This increased trade not only spurs economic growth but also exposes societies to new ideas and influences, leading to social reforms.

Moreover, technology has been a driving force behind economic development. Automation and digitalization have enhanced productivity, reduced costs, and created new job opportunities in emerging sectors. This has resulted in improved living standards and financial stability, prompting individuals to prioritize education, career growth, and personal fulfillment over starting families at an early age. As a result, birth rates have declined, contributing to the demographic transition.

Additionally, technology has played a crucial role in promoting social reforms and empowering individuals. Access to information and communication tools has increased awareness about reproductive health, family planning, and gender equality. People are now better informed and have greater control over their reproductive choices. Furthermore, technology has provided platforms for marginalized communities to voice their concerns and demand social change, leading to reforms that support the demographic transition.

In summary, technology has accelerated the demographic transition by strengthening trade networks, driving economic development, and promoting social reforms. The increased connectivity, economic opportunities, and empowerment offered by technology have collectively contributed to a more rapid decline in birth rates and the adoption of smaller family sizes.

Learn more about Advancement and Connectivity

brainly.com/question/10286843

#SPJ11

Who was the father of computer?????​

Answers

Answer:

Charles Babbage

Explanation:

Answer:

Charles Babbage

Explanation:

He created the computer in the early 19th century

compare and contrast separate function files with anonymous functions. in your opinion, when may it be best to use one over the other? can you use them interchangeably in all circumstances?

Answers

The difference between separate function files with anonymous function is:

Separate function files are named functions that are defined in their own individual files and can be imported and used in multiple parts of a program. They are useful for organizing code into reusable components and for creating functions that are intended to be used by other parts of a program. Anonymous functions, on the other hand, are unnamed functions that are defined inline, typically as arguments to other functions. They are useful for situations where a function is only used once and does not need to be reused.

In general, separate function files are better for defining reusable functions, while anonymous functions are better for situations where a function is only needed in one place. However, both types of functions can be used interchangeably in many circumstances, depending on the specific requirements of the program. Ultimately, the choice between separate function files and anonymous functions will depend on the needs of the program and the programming style of the developer.

Learn more about function files: https://brainly.com/question/10940617

#SPJ4

Lexicographic Comparison • Using the same name from the previous problem, tell the user whether their name comes before or after your name in the dictionary. Indexes • Test whether or not the name contains the letter ‘e’ in the first 3 letters

I have the project in a downloadable pdf.
I can't seem to be able to do "Lexicographic Comparison", with no clue how.
And "Starts With…", I am only able to print if their input is that 1 letter, not the first letter in a word.

Answers

You can also find this code on the repl.it platform. Due to Brainly's policy I can't copy it, I've attached it as a photo and file and you can check it in the comments. Good luck!

Lexicographic Comparison Using the same name from the previous problem, tell the user whether their name

CIP: You are told that the current exchange rate on Bitcoin is 19200−19206. Assume that the 12-month investment and borrowing rates in the US are 3.5% and 3.0% (annual) respectively. If the one year forward rate on Bitcoin is 19710−19750, what range of interest rates in Bitcoin investments does that imply?

Answers

The range of interest rates in Bitcoin investments implied by the given one year forward rate is approximately 2.78% to 2.92% (annual).

How is the range of interest rates in Bitcoin investments calculated based on the given one year forward rate?

To calculate the range of interest rates in Bitcoin investments, we need to consider the relationship between the spot rate, forward rate, and interest rate differentials. The forward rate represents the exchange rate at which two currencies will be traded in the future. The interest rate differentials reflect the difference between the interest rates of two currencies.

By subtracting the spot rate from the forward rate, we can find the premium or discount on the forward rate. In this case, the premium is given as 19710−19200 = 510.

To calculate the interest rate implied by the premium, we divide the premium by the spot rate (19200) and multiply by 100 to convert it to a percentage: (510 / 19200) * 100 ≈ 2.66%.

Finally, we add the interest rate differential between the US investment rate (3.5%) and the borrowing rate (3.0%) to the previously calculated interest rate: 2.66% + 3.5% - 3.0% ≈ 3.16%.

Therefore, the range of interest rates in Bitcoin investments implied by the given one year forward rate is approximately 2.78% to 2.92% (annual).

Learn more about Bitcoin investments

brainly.com/question/32531149

#SPJ11

Which method will return an empty string when it has attempted to read beyond the end of a file? a. read b. getline c. input d. readline d . readline

Answers

It is to be noted that the method will return an empty string when it has attempted to read beyond the end of a file is: "readline" (Option D).

What is an empty string?

An empty string is a zero-length string instance, but a null string has no value at all. The character "" represents an empty string. It consists of a zero-character sequence. Null represents a null string.

The empty string is a specific instance in which the sequence has length zero and so contains no symbols. There is only one empty string since two strings are only distinct if their lengths or symbol sequences differ.

Learn more about files:
https://brainly.com/question/14338673
#SPJ1

What are the Typical application
of mini computer​

Answers

Answer:

calls, messages, photos, emails

Explanation:

as in mobile phones

Answer:Minicomputers are used for scientific and engineering computations, business-transaction processing, file handling, and database management, and are often now referred to as small or midsize servers.

Explanation:

Does anyone know how to do Python Essentials 5.7.1.6 because i am completely lost

Does anyone know how to do Python Essentials 5.7.1.6 because i am completely lost
Does anyone know how to do Python Essentials 5.7.1.6 because i am completely lost

Answers

Answer:

create a 2d array of "#" for each letter, and use string manipulation or regular expressions to print each letter

Explanation:


Explain in brief why it is important for us to
understand a specific place early society's technology
?

Answers

Understanding a specific place in early society's technology is crucial because it offers insights into human ingenuity, historical development, and cultural evolution.

Early society's technology represents the foundation of human progress. By comprehending how our ancestors adapted to their environment and developed tools, we gain valuable knowledge about their intellectual capabilities and problem-solving skills. This understanding sheds light on the challenges they faced and how they overcame them, shaping their social structures and ways of life.

Furthermore, studying early technology allows us to trace the roots of modern inventions and innovations. Many contemporary technologies have deep historical origins, and recognizing these connections provides context and appreciation for today's advancements.

In conclusion, delving into a specific place in early society's technology enriches our understanding of human history and cultural heritage. It fosters a sense of connection to our past and enables us to learn from the experiences of our ancestors, ultimately influencing our present and guiding our future endeavors

To know more about cultural evolution ,visit:
https://brainly.com/question/32312595
#SPJ11

Top/Bottom Rules allow a user to apply conditional formatting to cells that fall within the top or bottom numbers or percentile. How many items will it allow the user to include in the rule?

the top or bottom 10 items or top or bottom 10% only
the top 10 items and top 10% only
the top or bottom 100 items only
any logical number of items or percentages in top or bottom value frames

Answers

C. TRUST

Explanation:

Answer:

*clears throat* ......... its c....... thank you for your time :).............. *standing ovation*

Explanation:

Design a program that ask the user to enter a series of positive numbers. The user should enter a negative number to the series. After all the positive numbers have been entered the program should display their sum

Answers

Answer:

total = 0

while True:

   number = float(input("Enter a number: "))

   

   if number < 0:

       break

   

   total += number

   

print("The total of the positive numbers entered is", total)

Explanation:

*The code is in Python.

Initialize the total as 0

Create a while loop. Inside the loop:

Ask the user to enter a number. Check the number. If it is smaller than 0 (This means it is a negative number), stop the loop using break. Add the number to the total (cumulative sum). (This way your program keeps summing numbers until you enter a negative number)

When the loop is done, print the total

Which one of the following is malicious software that denies you access to your files or your organization's files unless you pay a fee to unlock them?

A. hacking

B. ransomware

C. phishing

Answers

Answer:

Ransomware

Explanation:

Just as its name implies, you have to pay a 'ransom' to get a locked file that  belongs to you

(1)
What are patient portals? List three examples of what patients can
do on patient portal. What are some advantages to using the patient
portal?
(2) what is Telemedicine?
(3)How does VPN ensure data

Answers

Patient portals are secure websites that give patients access to their health information and tools to manage their healthcare.

Three examples of what patients can do on a patient portal include:View test results: Patients can access their test results from lab work, radiology imaging, and other diagnostic tests through the portal. They can also view any reports from these tests that have been shared with their healthcare provider.Schedule appointments: Patients can use the portal to schedule appointments with their healthcare provider, view upcoming appointments, and request changes to their appointments.View medical records: Patients can access their medical records, including their medication list, immunization records, allergies, and other important health information.

There are several advantages to using a patient portal, including:Convenience: Patients can access their health information and communicate with their healthcare provider from anywhere with an internet connection, making it easier to manage their healthcare.Engagement: Patient portals encourage patients to take an active role in their healthcare by giving them access to their health information and tools to manage their health. This can lead to improved health outcomes and better patient satisfaction.Accessibility: Patients with chronic conditions or who need frequent medical care can use the portal to track their health information, receive reminders about appointments and medication, and communicate with their healthcare provider. This can improve the quality of care and reduce healthcare costs.

(2)Telemedicine refers to the use of technology to deliver healthcare services remotely. This can include virtual visits with a healthcare provider, remote monitoring of patients’ health status, and the use of mobile health apps to track health information.Telemedicine has several advantages, including:Convenience: Patients can receive care from their healthcare provider without leaving their home or office. This can save time and reduce the need for transportation.Flexibility: Telemedicine can be used to deliver care to patients in remote or rural areas where access to healthcare services may be limited.Accessibility: Patients who have mobility issues or who live far from their healthcare provider can use telemedicine to receive care. This can improve the quality of care and reduce healthcare costs. (3)Virtual Private Network (VPN) is a secure connection that allows users to access the internet securely and anonymously. VPNs ensure data privacy by encrypting internet traffic and routing it through a remote server. This makes it difficult for anyone to intercept or view the user’s internet activity.VPNs are commonly used by businesses to protect their employees’ internet activity when they are working remotely. They are also used by individuals who want to protect their privacy while browsing the internet or accessing sensitive information such as financial data or healthcare information. VPNs can be used on desktop computers, laptops, and mobile devices.

Learn more about Network :

https://brainly.com/question/31228211

#SPJ11

A _________________ can also contain a single character or be entirely empty.

Answers

In Computer programming, a string can either contain a single character or be entirely empty.

The kinds of data type.

In Computer programming, there are five (5) main recognized data types and these include the following:

Integer type (int).Character type (char).Floating point type (float).Boolean (bool)String (str)

What is a string?

A string is a data type which is typically used for data values that comprises ordered sequences of characters. Also, a string can either contain a single character or be entirely empty.

An example of a string in computer programming is "Hello world"

Read more on a string here: https://brainly.com/question/25619349

The three most important factors that affect the distribution of resources are:

Answers

Answer:

The main factors that affect distribution of population are natural resources, climatic conditions, soils, cultural factors, age of human settlement, industrial development and means of transport and communication. The factors affecting distribution of population are described below one by one in a nutshell manner.

Explanation:

Hope it helps :)

which term refers to the data stored in computer memory on which the processor applies to program instructions

A.) equation
B.) variable
C.) operand
D.) integer

Answers

Answer:

I'm not 100% sure but i think the answers D

Explanation:

Answer: C. Operand

Explanation: Got it right on test

In the _____ phase, the event moves down the object hierarchy, starting from the root element and moving inward until it reaches the object that initiated the event.a. captureb. targetc. bubblingd. analyse

Answers

The question is asking about a specific phase related to events and object hierarchy.

The phase being referred to is the event propagation phase, which can either be in the capturing phase or the bubbling phase. In the capturing phase, the event moves down the object hierarchy, starting from the root element and moving inward towards the target element. In the bubbling phase, the event moves up the object hierarchy, starting from the target element and moving outward towards the root element.

Therefore, the correct answer to the question is option A, capture.

To learn more about bubbling phase, visit:

https://brainly.com/question/28139500

#SPJ11

Kelly is creating a presentation about social media in PowerPoint Online. She wants to share
the advantages and disadvantages of social media in her presentation. What is the best slide
layout for her to choose?
O Comparison
O Content with Caption
O Picture
O Title and Content

Answers

Answer:

Title and content would be nice if she uses.

Explanation:

It is better because it also has title and content

What is a commerce platform?

Answers

Answer:

In basic terms, a commerce platform simply refers to technology that enables a transaction (the commerce bit). The platform part allows you to overlay that technology across various channels such as online and in-store.

Answer:

Explanation:

a commerce platform simply refers to technology that enables a transaction (the commerce bit). The platform part allows you to overlay that technology across various channels such as online and in-store.20 Feb 2017

While setting up a home office, a technician disables the DHCP service on the office router, but does not want to rely on link-local addressing. Which of the following IP addressing methods should be used? Static APIPA Dynamic Alternate

Answers

When setting up a home office, it is important to ensure that all the necessary components are functioning correctly. DHCP (Dynamic Host Configuration Protocol) is a networking protocol that automatically assigns IP addresses to devices on a network.

If a technician disables the DHCP service on the office router, it means that devices on the network will not be able to automatically obtain IP addresses. In this scenario, relying on link-local addressing may not be the best option. Link-local addressing is used when devices need to communicate with each other on a local network but are not connected to the internet. Therefore, if the home office network needs to communicate with the internet, link-local addressing may not be sufficient.
The most appropriate IP addressing method to use in this scenario would be static IP addressing. This involves manually assigning IP addresses to each device on the network. Static IP addresses are useful when devices need to communicate with each other on a local network and when they need to connect to the internet. However, it is important to note that manually assigning IP addresses can be time-consuming and requires technical knowledge. Another option could be dynamic IP addressing, where IP addresses are automatically assigned to devices on the network using DHCP. However, since the DHCP service has been disabled, this may not be a viable option.

Know more about DHCP (Dynamic Host Configuration Protocol) here;

https://brainly.com/question/32507592

#SPJ11

which category does this fall in identity theft​

Answers

Answer:

A crime.

Explanation:

It's illegal.

because a mobile device is similar a computer and transmits wireless signals, what laws does an investigator need to follow?
A. Computer laws and radio laws
B. grounded anti-static wristband
C. First Amendment rights

Answers

An investigator dealing with mobile devices needs to follow computer laws and radio laws.

Mobile devices, being similar to computers, are subject to laws and regulations that govern computer-related activities. These laws typically encompass various aspects of digital communication, data privacy, cybersecurity, and electronic evidence handling. Investigators working with mobile devices must adhere to these laws to ensure legal and ethical practices during investigations.

Additionally, mobile devices transmit wireless signals and operate within the realm of radio frequency communications. Therefore, investigators also need to follow radio laws, which regulate the use of wireless technologies and govern issues such as spectrum allocation, signal interference, licensing, and compliance with transmission standards. These laws aim to ensure the proper and lawful operation of wireless devices, including mobile devices.

While First Amendment rights protect freedom of speech and expression, they may not directly pertain to the specific laws and regulations that investigators need to comply with when working on mobile device investigations. However, it is important for investigators to respect constitutional rights while conducting their investigations to maintain a balance between investigative efforts and individual liberties.

To learn more about computers visit:

brainly.com/question/21474169

#SPJ11

Text books are not a good source for finding ideas about what to study because the teachers make up the test questions. Please select the best answer from the choices provided T F

Answers

Answer:

Text books are not a good source for finding ideas about what to study because the teachers make up the test questions. False- most teachers use the textbooks as guides. Visiting the library to seek books on your current topic will not help you in determining what to study.

Explanation:

Text books are not a good source for finding ideas about what to study because the teachers make up the test questions. False- most teachers use the textbooks as guides. Visiting the library to seek books on your current topic will not help you in determining what to study.

Answer:

False

Explanation: I took the test and passed!!

In the bremmer article, the author states that _________ translates into greater risks.

Answers

Answer:

instability

Explanation:

Other Questions
Why did many women lose interest in politics during the 1920s? How many objective lenses are there, How many total lenses are there in a microscope, and How many adjustment knobs are used to magnify an object? (compound microscope) who or what btw this is 6th grade science and this is not a true or false question write a telephone conversation between -caller name is WHO -operator name is Asking 1. Which of the following is NOT true of a dichotomous key? They can be used to identify an organism by its scientific name. They can be used by anyone, even without specialized scientific knowledge. They can sometimes experience errors because closely related species may share many of the same characteristics. None of the above only answer if you know! no spams :) The significance of the cherry blossom tree in ________ culture goes back hundreds of years. In their country, the cherry blossom represents the fragility and the beauty of life. It's a reminder that life is almost overwhelmingly beautiful but that it is also tragically short. Which culture would best fill in the blank?. Fossil fuels are the carbon remains of plants and animals that died long ago.TrueFalse 2/9 of the students are in sixth-grade a. How many sixth graders are there if the school has 90 students?b. How many sixth graders are there if the school has 270 students? solve for y: 20=8x+4y Which part represents the coding part of DNA?a. Phosphate groupb. Pentose sugarc. Nitrogenous based. Entire structure how do you believe america was defined during these early years of the united states and what turned out to be its true character please answer all three I'll give 5 stars and brainliest Which of the following is an example of a capital market instrument? Group of answer choices Banker's acceptances. Commercial paper. Money market mutual funds. U.S. Treasury bills. Preferred stock. What advantages did the US believe it would gain with the acquisition of Hawaii and Alaska?A. Access to markets in AsiaB. Greater opportunity to gain new statesC. Increased acres of farmable land alejandro, a technician specializing in the development of computer software, agrees to develop software for lola's company, but when he becomes ill, he transfers that responsibility to carmen, a friend of his. the transfer to carmen is called a(n): How did industrialization create unevenness amongst countries? european nations are beginning to take measures to curb the large economic gap between the rich and the poor. true or false? a proportion is a type of ratio in which the numerator is part of the denominator and can be expressed as a percentage. what type of nonverbal communication are speech components like tone, pitch, facial expressions, and hesitation noises?A. emotional languageB. spoken languageC body language D paralanguage