deliverables: you must use functions and classes to modularize your work. you should use exception handling where necessary as well. 50 points off for programs that crash on expected input. store and cart: in this assignment you will use classes and inheritance to create an application where user will input name and location of store and will start his/her grocery shopping by adding them to the cart. classes you will have to implement two classes with methods and attributes to finish up this program. the methods given here have to be implemented, however, you can add extra methods or attributes as needed. store the store class will include the following: - constructor - two instances attribute (name and location). - one setter method: to set the name and the location. - display method: to output all information from store class (the name and the location of the store).

Answers

Answer 1

To complete the assignment, modularize your code using functions and classes. Utilize exception handling and implement two classes: "Store" with a constructor, setter method, and display method. Test your program thoroughly to avoid crashes and deductions in points.

To complete this assignment, you will need to use functions and classes to modularize your work. Additionally, you should utilize exception handling where necessary to ensure that your program does not crash on expected input. Failure to do so will result in a deduction of 50 points.

The main goal of this assignment is to create an application where the user can input the name and location of a store and then start their grocery shopping by adding items to a cart. To accomplish this, you will need to implement two classes with methods and attributes.

The first class you will need to implement is the "Store" class. This class should have a constructor that initializes two instance attributes: "name" and "location". Additionally, you should include a setter method that allows you to set the name and location of the store.

Lastly, you will need to implement a "display" method in the Store class. This method should output all the information from the Store class, including the name and location of the store.

Here is a step-by-step breakdown of what you need to do:

1. Define the Store class with the following attributes:
  - name
  - location

2. Implement a constructor in the Store class that takes the name and location as parameters and assigns them to the corresponding attributes.

3. Implement a setter method in the Store class that allows you to set the name and location of the store.

4. Implement a display method in the Store class that outputs all the information from the Store class, including the name and location of the store.

Remember, you have the flexibility to add extra methods or attributes as needed to complete the program successfully. Make sure to test your program thoroughly to ensure it functions as expected and does not crash on expected input.

Learn more about code : brainly.com/question/28338824

#SPJ11


Related Questions

The Transient response is transient in nature and sholuld be removed quickin from the total component Statement-2: The transient component is produced due to energy disspatiris elements. Statement-3: The Steady state component is obtained at 5 times of time constarit. OPTIONS All Statements are correct All Statements are wrong Statement 2 is wrong and Statements 1 and 3 are correct. Statement 3 is Correct and Statements 1 and 2 are wrong.

Answers

Transient response is transient in nature and should be removed quickly from the total component.The first statement of the given question is correct. The correct answer is option D: Statement 3 is correct and Statements 1 and 2 are wrong.

The transient response of a circuit is a temporary response that occurs after a circuit is turned on or off, or after an input signal is applied, and it slowly dies away to zero as the circuit reaches its steady-state response.

The steady-state response is the final output value of the circuit that is reached after the transient response has died away. The transient component is the part of the response that is due to the circuit's energy storage elements, such as capacitors and inductors.

So, Statement 2 is also correct. The time constant is the time it takes for the circuit to reach its steady-state response, and it is equal to the product of the resistance and capacitance or inductance of the circuit. The steady-state component is obtained after 5 time constants have passed.

So, Statement 3 is also correct. Hence, the correct answer is option D: Statement 3 is correct and Statements 1 and 2 are wrong.

To know more about transient visit :

https://brainly.com/question/32063625

#SPJ11

Social Engineering as Art and Science The logic behind social engineering is simple - it can be easy to get all the information and access that one needs from any person as long as you know how to trick a person into giving you the data you need with the least resistance possible. By being able to pull off a social engineering trick, you will be able to get your hands on to a device, account, or application that you need to access in order to perform bigger hacks or hijack an identity altogether. That means that if you are capable of pulling of a social engineering tactic before attempting to go through all other hijacking tactics up your sleeve, you do not need to make additional effort to penetrate a system. To put this entire concept into simpler terms, social engineering is a form of hacking that deals with manipulation of victims through social interaction, instead of having to break right away into a computer system. What makes social engineering difficult is that it is largely based on being able to secure trust, which is only possible by getting someone's trust. For this reason, the most successful hackers are capable of reading possible responses from a person whenever they are triggered to perform any action in relation to their security system. Once you are able to make the right predictions, you will be able to get passwords and other valuable computer assets without having to use too many tools.

Answers

Social engineering is considered as both an art and a science. It is a form of hacking that involves the manipulation of victims through social interaction instead of directly breaking into a computer system.

The logic behind social engineering is simple, if one knows how to trick a person into giving out the data they need, they can easily access all the information and access they need with the least resistance possible. This makes social engineering a crucial part of hacking since it allows hackers to gain access to devices, accounts, or applications without making any additional effort.

By using social engineering tactics, a hacker can access a system without having to go through all the other hijacking tactics up their sleeve.The most challenging part of social engineering is securing trust, which is only possible by getting someone's trust. Hackers use various tactics to predict possible responses from a person whenever they are triggered to perform any action in relation to their security system.

The ability to read possible responses from a person is a significant skill for hackers since it enables them to predict passwords and other valuable computer assets without having to use too many tools. Successful hackers use social engineering as a powerful tool to penetrate a system.

In conclusion, social engineering is an essential component of hacking, and a significant part of its success lies in the art of manipulation.

To know more about considered visit:

https://brainly.com/question/14110803

#SPJ11

Which of the following is NOT true about applying filters to a datasheet? (microsoft access) A filter is a simple technique to quickly reduce a large amount of data to a much smaller subset of data A filter is a condition you apply permanently to a table or query. You can choose to save a table with the filter applied so when you open the table later the filter is still available. All records that do not match the filter criteria are hidden until the filter is removed or the table is closed and reopened.

Answers

A filter is a condition you apply permanently to a table or query.

What is the purpose of applying filters to a datasheet in Microsoft Access?

Applying filters to a datasheet in Microsoft Access allows you to quickly reduce a large amount of data to a much smaller subset based on specific criteria. However, the statement "A filter is a condition you apply permanently to a table or query" is NOT true. In Microsoft Access, filters are temporary conditions applied to a datasheet to temporarily display only the records that meet the specified criteria. Filters do not permanently alter the underlying table or query.

When a filter is applied, all records that do not match the filter criteria are hidden, and only the matching records are visible until the filter is removed or the table is closed and reopened. Filters provide a convenient way to analyze and work with specific subsets of data without permanently modifying the data itself.

Learn more about  permanently

brainly.com/question/1443536

#SPJ11

Calculate the storage size of image ( uncompressing ) in Gbyte for each True Color image, Note that the dimensions of image 512 X3 512

Answers

According to the information we can infer that the storage size of an uncompressed True Color image with dimensions 512x512 pixels is approximately 3 gigabytes (Gbyte).

What is the storage size of the image?

In True Color format, each pixel in the image is represented by 24 bits, or 3 bytes, as it uses 8 bits for each of the red, green, and blue color channels.

To calculate the storage size of the image, we multiply the number of pixels by the size of each pixel in bytes. The number of pixels can be calculated by multiplying the width and height of the image, which in this case is:

512 x 512 = 262,144 pixels.

Since each pixel requires 3 bytes, the total storage size of the image can be calculated as follows:

262,144 pixels * 3 bytes/pixel = 786,432 bytes

To convert the storage size from bytes to gigabytes, we divide by 1,073,741,824 (1024³):

786,432 bytes / 1,073,741,824 bytes/Gbyte = 0.000731 Gbyte

According to the above we can conclude that the storage size of the uncompressed True Color image with dimensions 512x512 pixels is approximately 0.000731 Gbyte, which can be rounded to approximately 3 Gbytes.

Learn more about storage size in: https://brainly.com/question/31748273
#SPJ4

Consider a cogeneration system operating as illustrated in Fig. 2. The steam generator provides a 10^6 kg/h of steam at 8 MPa, 480 degree C, of which 4 times 10^5 kg/ h is extracted between the first and second turbine stages at 1 MPa and diverted to a process heating load. Condensate returns from the process heating load at 0.95 MPa, 120 degree C and is mixed with liquid exiting the lower- pressure pump at 0.95 MPa. The entire flow is then pumped to the steam generator pressure. Saturated liquid at 8 kPa leaves the condenser. The turbine stages and the pumps operate with isentropic efficiencies of 86 and 80%, respectively. Determine a) the heating load, in kJ /h. b) the power developed by the turbine, in kW. c) the rate of heat transfer to the working fluid passing through the steam generator, in kJ /h. d) Sketch the processes on T- S diagram.

Answers

The analysis involved calculating the heating load, power developed by the turbine, rate of heat transfer to the working fluid, and sketching the processes on a T-S diagram.

To analyze the given system, we need to determine the heating load, power developed by the turbine, rate of heat transfer to the working fluid passing through the steam generator, and sketch the processes on a T-S diagram.

For the heating load, we calculate the heat transferred using mass flow rate and specific enthalpy difference.

To find the power developed by the turbine, we consider the isentropic efficiency of the turbine and use the same equation as for the heating load.

The rate of heat transfer to the working fluid passing through the steam generator is determined using mass flow rate and specific enthalpy difference.

Lastly, to sketch the processes on a T-S diagram, we plot the states of the working fluid at different points in the system and connect them with lines, labeling each process and state.

Learn more about T-S diagram: brainly.com/question/13507661

#SPJ11

the spring-loaded service valve used in air conditioning systems is called a ____ valve.

Answers

The spring-loaded service valve used in air conditioning systems is called a Schrader valve. It is a very common valve used in many different applications. The Schrader valve is named after its inventor, August Schrader.

The Schrader valve is typically found in air conditioning systems, refrigeration systems, and automobile tires. The valve is used to help control the flow of refrigerant or air through the system. It is a spring-loaded valve that is easy to use and very reliable.

There are many different types of Schrader valves available. Some are designed for high-pressure applications, while others are designed for low-pressure applications. Some Schrader valves are designed to be used with different types of refrigerants or air.

The spring-loaded service valve used in air conditioning systems is called a Schrader valve. The valve is very important to the overall operation of the air conditioning system. It is used to help control the flow of refrigerant through the system, which is critical to its operation.

To know more about air conditioning systems visit :

https://brainly.com/question/32246245

#SPJ11

A set of function and call programs that allow clients and servers to

intercommunicate is a(n) ________ interface.

A) SQL B) relational database

C) middleware D) application programming

Answers

A set of function and call programs that allow clients and servers to

intercommunicate is a(n) middleware interface. so the correct option is c.

Middleware refers to a set of function and call programs that enable communication between clients and servers. It acts as an intermediary layer, facilitating interactions and data exchange between different applications and systems.

Middleware plays a crucial role in connecting various components of a computing system, allowing them to work together seamlessly. It abstracts the complexities of underlying systems, providing a standardized interface for communication.

In conclusion, middleware serves as a bridge between clients and servers, enabling intercommunication and facilitating the exchange of data and services. It plays a vital role in integrating different software components and systems, ultimately enhancing the interoperability and efficiency of an overall computing environment.

You can learn more about intercommunication between clients and servers at

https://brainly.com/question/29894454

#SPJ11

What is the run time for the following algorithm? Explain your approach
public static int func(int n) {
int count = 0;
for (int i=0; i for (int j=i; j for (int k=j; k if (i*i + j*j == k*k)
count++;
}
}
}
return count;
}

Answers

The provided code snippet is an implementation of the brute-force algorithm to find Pythagorean triplets within the range of [1, n].

Pythagorean triplets are those sets of three numbers {a, b, c} that satisfy the equation a^2 + b^2 = c^2,

where a, b, and c are positive integers. The algorithm can be used to find the number of Pythagorean triplets with a range [1, n] and return the count to the calling function.

The innermost loop executes n - j times, the middle loop executes n - i times, and the outermost loop executes n times. The total number of iterations can be calculated as follows:

[tex]∑∑∑ (n - k) = ∑∑∑ n - ∑∑∑ kk=1 i=1 j=1 k=1 i=1 j=1[/tex]
= n^3 - ∑∑(n - j) - ∑∑(n - i - 1)
i=1 j=1 i=1 j=1

[tex]= n^3 - ∑∑n - ∑∑j + ∑∑i + ∑∑1i=1 j=1 i=1 j=1[/tex]
= n^3 - n^3/2 - n^3/2 + ∑∑i + ∑∑1
i=1 j=1 i=1 j=1

[tex]= n^3 - n^3 + ∑∑i + ∑∑1i=1 j=1 i=1 j=1[/tex]
= ∑n + ∑1
i=1 j=1

[tex]= n^2 + n[/tex]
Therefore, the time complexity of the provided algorithm is O(n^3), which means that the algorithm takes a cubic time in the worst-case scenario.

This time complexity implies that the algorithm is inefficient for large values of n and can take a long time to execute.

For instance,

if n = 1000

then the algorithm will execute 1,000,000,000 iterations.

Hence, the run time of the algorithm will increase linearly with the value of n.

To know more about implementation visit:

https://brainly.com/question/32181414

#SPJ11

9. Why are karyotypes useful diagrams? What can they show you about an organism? 10. Organisms have different numbers of chromosomes. Fill in the chart below about 5 different organisms. Species # of homologous # of chromosomes in # of chromosomes in diploid cells chromosome pairs in haploid cells diploid cells (2n) (n) Humans 46 23 pairs Bat 44 Monkey 21 pairs Camel 35 Dog 78 1 1. The number of chromosomes during meiosis is incredibly important. Why is that? Exercise 2.10.7: The Unit Circle In this program we are going to practice using the Math class by computing some important values on the unit circle. Using the angles 0, PI/2, and PI, print out the angle, the cosine of the angle, and the sine of the angle. Your output should look like this: Radians: (cos, sin) 0.0: 1.0, 0.0 1.5707963267948966: 0.0, 1.0 3.141592653589793: -1.0, 0.0 Hints: You'll need to use the Math.sin, Math.cos methods and the Math.PI constant! You can round a decimal to 2 decimal places by multiplying by 100, rounding to the nearest int using Math.round, and then dividing by 100. You will need to round the sine and cosine values. Here's an example: double angle = Math.PI/4; double cosine = Math.cos(angle); // 0.707106781 cosine = cosine * 100; // 70.7106781 cosine = Math.round(cosine); // 71.0 cosine = cosine / 100.0; // 0.71 // Or put it all on one line: cosine = Math.round(cosine * 100) / 100.0; Some Math Background The Java methods need the angles to be in radians, rather than degrees. PI/2 radians is equal to 90 degrees. PI radians is equal to 180 degrees. That's why we're using multiples of PI in this exercise. UnitCircle.java public class UnitCircle { public static void main(String[] args) { System.out.println("Radians: (cos, sin)"); // Put your code here! } }

Answers

Karyotypes show chromosomes, genetic abnormalities; meiosis is important for diversity and errors cause disorders.

Karyotypes are useful diagrams because they provide a visual representation of an organism's chromosomes. They show the number, size, and shape of chromosomes arranged in pairs according to their morphology. Karyotypes can be created using various techniques, such as staining and microscopic imaging.

Karyotypes provide important information about an organism's genetic composition. They can reveal the total number of chromosomes in a cell, the presence of any structural abnormalities or rearrangements, and the sex of an individual (in species with sex chromosomes). By analyzing karyotypes, scientists can identify chromosomal disorders, such as Down syndrome, Turner syndrome, or Klinefelter syndrome, as well as certain types of cancer-related chromosomal abnormalities.

Additionally, karyotypes can provide insights into evolutionary relationships and genetic diversity among different species. By comparing karyotypes across species, scientists can determine the similarities and differences in chromosome organization and identify evolutionary changes that have occurred over time.

Species Number of homologous chromosome pairs (2n) Number of chromosomes in haploid cells (n) Humans 23 pairs 46 23 Bat 22 pairs 44 Monkey 21 pairs 42 Camel 17 pairs 34 Dog 39 78 39

The number of chromosomes during meiosis is incredibly important because it determines how genetic material is divided and distributed to gametes (sex cells). Meiosis is a specialized cell division process that produces haploid cells (gametes) with half the number of chromosomes as the parent cell (diploid). During meiosis, homologous chromosomes pair up, exchange genetic material through recombination, and separate into different cells. This genetic shuffling and chromosome segregation during meiosis contribute to genetic diversity in offspring.

The correct number of chromosomes is crucial during meiosis to ensure the proper segregation of genetic material. Errors in chromosome number, such as nondisjunction, can lead to aneuploidy, where gametes or offspring have an abnormal number of chromosomes. Aneuploidy can result in developmental abnormalities, infertility, or genetic disorders, as observed in conditions like trisomy 21 (Down syndrome) or monosomy X (Turner syndrome).

Understanding the number and behavior of chromosomes during meiosis is vital for studying inheritance patterns, genetic disorders, and reproductive biology across different organisms.

learn more about Chromosomes and Meiosis.

brainly.com/question/31881886

#SPJ11

Which of the following are advantages of implementing cloud computing over services hosted internally? (Select THREE.) a. Rapid elasticity b. On-demand services c. Metered services d. Extensive technical configuration e. On-site servers f. No Internet connection required The accounting department has implemented thin clients and VDI. One of the users is complaining that each time she powers on her thin client, she has access only to a web browser. Which of the following is the most likely reason for this behavior? (Select TWO.) a. The user has been assigned a nonpersistent VDI account. b. The user has not signed in to the VDI server with her user account and password. c. The user has been assigned a persistent VDI account. d. The user has entered incorrect credentials to the VDI server. e. The user's thin client does not have an operating system configured.

Answers

Q1. The advantages of implementing cloud computing over services hosted internally are 1. Rapid elasticity. 2. On-demand services. 3. Metered services. Options A, B, and C. Q2. The user has not signed in to the VDI server. The user's thin client does not have an operating system configured. Options C and E.

The advantages of implementing cloud computing over services hosted internally are:

1. Rapid elasticity: Cloud computing allows for quick scalability, allowing businesses to easily increase or decrease their resources based on demand. This means that organizations can quickly adapt to changing needs without having to invest in additional infrastructure.

2. On-demand services: With cloud computing, users can access services and resources whenever they need them. This flexibility allows for more efficient resource allocation and can lead to cost savings by only paying for what is actually used.

3. Metered services: Cloud computing often offers a pay-per-use model, where users are billed based on the amount of resources they consume. This allows for better cost control and resource optimization, as organizations only pay for the exact amount of resources they need.

In the case of the user complaining about only having access to a web browser on her thin client after powering it on, the most likely reason for this behavior would be:

1. The user has not signed in to the VDI server with her user account and password. In order to access the full range of services and applications available on the thin client, the user needs to authenticate herself by signing in to the VDI server. This ensures that she has the necessary permissions to access all the resources assigned to her account.

2. The user's thin client does not have an operating system configured. Without a properly configured operating system, the thin client may only be able to provide basic web browsing functionality. To access additional applications and services, the thin client needs to have a fully functional operating system installed.

It's important to note that the other options mentioned in the question, such as nonpersistent or persistent VDI accounts, or incorrect credentials, may also cause issues with accessing services on the thin client. However, based on the information provided, the most likely reasons are the ones explained above.

Hence, the right answer is Options A, B, and C. Q2 and Options C and E.

Read more about Cloud Computing at https://brainly.com/question/32971744

#SPJ11

how to replace the modulator pressure solenoid in a 2000 jeep grand cherokee l6 cyl, 4.00 l with a 42re automatic transmission

Answers

Replacing the modulator pressure solenoid in a 2000 Jeep Grand Cherokee L6 cyl, 4.00 L with a 42RE automatic transmission involves the following steps: 1. Locate the solenoid, 2. Remove the old solenoid, and 3. Install the new solenoid.

1: Locate the solenoid - The modulator pressure solenoid is a critical component of the transmission system and is usually located on the transmission valve body. To access it, you may need to raise the vehicle and remove the transmission pan to reach the valve body.

2: Remove the old solenoid - Once you have access to the solenoid, disconnect any electrical connectors and other components that might obstruct its removal. Carefully remove the old solenoid from the valve body, ensuring not to damage the surrounding parts.

3: Install the new solenoid - Before installing the new solenoid, ensure it matches the specifications of the old one. Gently place the new solenoid into the valve body and secure it in place. Reconnect any electrical connectors and components that were disconnected during the removal process.

It's crucial to consult the vehicle's repair manual or seek professional assistance before attempting this procedure, as working on the transmission system requires proper knowledge and tools. Moreover, you may need to refill the transmission fluid after completing the replacement to ensure proper operation.

Learn more about pressure

brainly.com/question/30673967

#SPJ11

Other Questions
Calculate the double integral. 6x/(1 + xy) dA, R = [0, 6] x [0, 1] Olam Question # 2 Revisit How to attempt? Question : Think a Number Bob and Alice play a game in which Bob gives Alice a challenge to think of any number M between 1 to N. Bob then tells Alice a number X. Alice has to confirm whether X is greater or smaller than number M or equal to number M. This continues till Bob finds the number correctly. Your task is to find the maximum number of attempts Bob needs to guess the number thought of by Alice. Input Specification: input1: N, the upper limit of the number guessed by Alice. (1 How can telephone lines be used for data transmission?Why does ADSL2 perform better than ADSL over short distances but similarly over long distances?What is Vectored VDSL? How did cable TV operators become internet service providers?How do optical fibre cables augment DSL systems? Click to see additional instructions The nominal interest rate is 12%. The tax rate on nominal interest is 25%. The after tax nominal interest rate is Let f(x)= e^x/1+e^x (a) Find the derivative f.Carefully justify each step using the differentiation rules from the text. (You may identify rules by the number or by a short description such as the quotient rule.) In the experiments of Davisson and Geer, an electron beam with energy of 54eV struck a close-packed nickel surface perpendicularly. A diffracted beam was observed at an angle of 50 to the perpendicular. Calculate i. The wavelength of the electrons. ii. The spacing between the rows of nickel atoms. iii. The metalic radius of nickel. Explain how the ratings process for municipalities interested in securing financing and co-financing for own or co-developed renewable energy power plants with independent producers or small and embedded power producers would work, and evaluate the risks and viability of this industry structure where municipalities replace Electricity company in the developer and power purchase agreements? in the run-mode clock configuration (rcc) register, bits 26:23 correspond to the system clock divisor. what bit values should be placed in this field to configure the microcontroller for a 25 mhz system clock? {V}_2 {O}_5Express your answer using one decimal place and include the appropriate unit.the molar mass = Find the distance from the point (5,0,0) to the linex=5+t, y=2t , z=125 +2t Let E, F and G be three events in S with P(E) = 0.48, P(F) =0.52, P(G) = 0.52, P(E F) = 0.32, P(E G) = 0.29, P(F G) =0.26, and P(E F G) = 0.2.Find P(EC FC GC). All of the following organisms produce exotoxins EXCEPTA) Salmonella typhi.B) Clostridium botulinum.C) Corynebacterium diphtheriae.D) Clostridium tetani.E) Staphylococcus aureus. Multiple users share a 10Mbps link. Each user requires 10Mbps when transmitting, but each user transmits for only 10% of the time. When circuit switching is used, how many users can be supported? On your twelfth birthday, you received $1,000 which you invested at 10.0 percent interest, compounded annually. Your investment is now worth $1,948.72. How old are you today? Age 15 Age 21 Age 17 Age 19 Age 23 Create a database for a selected place with at least 3 tables. Use MS SQL Server or Oracle. (20 marks) Step 2 - Insert sample dataset for testing purpose (more than 1000 records for each table). Use a script to generate sample data. (20 marks) Step 3 - Write 5 different SQL queries by joining tables. (30 marks) Step 4 - Recommend set of indexes to speed up the database and discuss the query performance based on statistics of execution plans. a. Whit would Rockis profit margin be if the Lime division were dropped? b. What would Rock's profit margin be if the Nina division were dropped? If Mr. Smith thinks the last dollar spent on shirts yields less satisfaction than the last dollar spent on cola, and Smith is a utility-maximizing consumer, he shoulda. decrease his spending on cola.b. decrease his spending on cola and increase his spending on shirts.c. increase his spending on shirts.d. increase his spending on cola and decrease his spending on shirts Blue Mountain Distributors has a $40 million bond outstanding that carries a 12 percent coupon rate paid annually. Current bonds yield are 9.5 percent. The $40 million bond was issued 20 years ago with 30 years to maturity and carries a call premium of 5%. With the fall in interest rates the company's Finance Manager has recommended that the bond be refunded. The new bond issue would require $1.2 million in underwriting cost and an overlap period of one month is anticipated. Short term money market rates are currently 7 percent and Blue Mountain has a tax rate of 40 percent. Required: Advise Blue Mountain Distributors on whether or not they should refund the bond. (Show all calculations) the final result of the classical theory of the geomorphic cycle concept is: The Brady family received 27 pieces of mail on December 25 . The mail consisted of letters, magazines, bills, and ads. How many letters did they receive if they received three more magazines than bill