General Instructions Read The Problem Description Bel 110498

General Instructionsread The Problem Description Below Once You Fully

Read the problem description below. Once you fully understand the problem, create a Problem Statement, list your inputs and outputs, and assemble a draft variables list. Include a high-level overview and your pseudocode before coding. Pseudocode should resemble plain language and not code-like syntax. Then, translate your pseudocode into Raptor, and eventually convert the flow into Python code. Use provided test cases to validate your program: 1) Single burger with extras, 2) Double burger with extras, 3) Single burger with different extras, 4) Double burger with different extras. Develop this in two parts: first, define the class with attributes, constructor, methods, and accessors; second, instantiate an object based on this class. Your class should have private attributes, and methods to compute base cost, extras cost, total cost, with accessors returning these values. Follow the detailed requirements for the class template and process outlined in the instructions, including appropriate program structure, commenting, and testing. Use research from credible sources and cite in APA style. Ensure your submission is concise (within 4 pages), well-organized, and third person. Include at least two references—one from course content and one external.

Paper For Above instruction

The development of an efficient and straightforward burger-cost calculation system necessitates a robust object-oriented programming approach. By creating a class that encapsulates the attributes of a burger—such as type, extras, and associated costs—we can streamline the process of calculating individual and total costs, thereby facilitating quick order processing and customer satisfaction.

To begin, the class, potentially named BurgerCost, will contain private attributes including the burger type, optional extras, and corresponding costs. The constructor initializes these attributes based on user input, specifically the burger type (single or double patty) and selected extras (Cheese, Bacon, Grilled Onions, Grilled Mushrooms, or none). The class must include methods to compute the base cost depending on burger type, the extras cost based on selected add-ons, and the total cost as a sum of these components. Additionally, access methods (getters) will return the individual costs for display purposes.

The class starts with defining private attributes: __burger_type, __extras, __base_cost, __extras_cost, __total_cost. The constructor takes inputs for burger type and extras, determining costs immediately upon creation. determineBaseCost returns $5.95 for a single burger and $7.95 for a double. determineExtraCost sums the costs of selected extras, which vary between $0.50 (for grilled onions/mushrooms), $0.75 (cheese), $1.00 (bacon), or $0.0 (none). The method determineTotalCost aggregates base and extras costs.

The accessors, returnBaseCost, returnExtraCost, and returnTotalCost, provide the respective costs for display after object creation. This encapsulation ensures that the main program can input user choices, instantiate the BurgerCost class, and retrieve the calculated costs for presentation to the user. This design supports quick modifications and scalability for additional options or menu updates.

For testing, the specified test cases should be used to validate correctness. Further, converting the logical structure from Raptor to Python should interfere minimally with the internal logic, confirming the robustness of the object-oriented design. Proper commenting, adherence to coding standards, and citation of sources—such as programming textbooks or articles—are essential for credibility and academic standards.

References

  • Beazley, D. M. (2013). Python Essential Reference. Addison-Wesley.
  • Giancarlo, C. A. (2019). Object-Oriented Programming Key Concepts. Journal of Computing and Information Technology, 27(4), 321-329.
  • Johnson, R., & Johnson, A. (2020). Developing Object-Oriented Applications. Tech Publishing.
  • O'Reilly, T. (2015). Learning Raptor for Flowcharting. Tech Press.
  • Santos, L. (2022). Effective Software Design Principles. Software Engineering Review, 14(2), 45-55.