A deluxe meal, represented by a DeluxeMeal object, includes a side dish and a drink for an additional cost of $3. The DeluxeMeal class is a subclass of Meal. The DeluxeMeal class contains two additional attributes not found in Meal: A String variable representing the name of the side dish included in the meal A String variable representing the name of the drink included in the meal

Answers

Answer 1

Answer:

DeluxeMeal burritoCombo = new DeluxeMeal ("burrito", "chips", "Lemonade", 7.49);

Explanation:

The above statement will be inserted in the software and the result will show the Deluxe meal details such as burrito which is an entrée, chips are side dish and lemonade is a drink. The cost of single burrito is 7.49 so with the meal the cost will be $3 higher which means the total cost will be $10.49

Answer 2
Java code for the problem:

Java is a high-level, general-purpose, object-oriented, and secure programming language developed by James Gosling at Sun Microsystems, Inc. in 1991. It is formally known as OAK.

The codes are attached below.

//Complete implementation of Meal class

class Meal{

       //Declaring variables

       String name;

       double cost;

       //Constructor to initialize objects

       public Meal(String name,double cost){

               this.name=name;

               this.cost=cost;

       }

       //Overriding toString() method

       public String toString(){

               return name+" meal, $"+cost;

       }

}

class DeluxeMeal extends Meal{

       String sidedish;

       String drink;

public DeluxeMeal(String name,String sidedish,String drink,double cost){

               super(name,cost);

               this.sidedish=sidedish;

               this.drink=drink;

       }

       public String toString(){

               return "deluxe "+name+" meal, $"+(cost+3);

       }

       

}

class MealEx{

       public static void main(String[] args){

               /*Creating the object of Meal class

               Meal burger=new Meal("hamburger",7.99);

               System.out.println(burger.toString());*/

               DeluxeMeal burritoCombo = new DeluxeMeal("burrito", "chips", "lemonade", 7.49);

               System.out.println(burritoCombo.toString());

       }

}

The output is attached below.

Learn more about the topic Java code:

https://brainly.com/question/2266606

A Deluxe Meal, Represented By A DeluxeMeal Object, Includes A Side Dish And A Drink For An Additional

Related Questions

Which of the following characterizes how an enabled security program might react to a new program installation on a computer system?


It might alert you to space requirement excesses.

It might report an error or tell you that the file is corrupted.

It might protect the new installation from getting viruses.

It might automatically set a restore point for the computer system.

Answers

Answer:

It might automatically set a restore point for the computer system

Answer:

It might report an error or tell you that the file is corrupted.

Explanation:

A gui allows you to interact with objects on the screen such as icons and buttons true or false

Answers

Answer:

True

Explanation:

You are a visitor at a political convention with delegates; each delegate is a member of exactly one political party. It is impossible to tell which political party any delegate belongs to; in particular, you will be summarily ejected from the convention if you ask. However, you can determine whether any pair of delegates belong to the same party or not simply by introducing them to each other. Members of the same party always greet each other with smiles and friendly handshakes; members of different parties always greet each other with angry stares and insults.

Required:
Suppose more than half of the delegates belong to the same political party. Design a divide and conquer algorithm that identifies all member of this majority party and analyze the running time of your algorithm.

Answers

Answer:

The algorithm is as follows:

Step 1: Start

Step 2: Parties = [All delegates in the party]

Step 3: Lent = Count(Parties)

Step 4: Individual = 0

Step 5: Index = 1

Step 6: For I in Lent:

Step 6.1: If Parties[Individual] == Parties[I]:

Step 6.1.1: Index = Index + 1

Step 6.2: Else:

Step 6.2.1 If Index == 0:

Step 6.2.2: Individual = I

Step 6.2.3: Index = 1

Step 7: Else

Step 7.1: Index = Index - 1

Step 8: Print(Party[Individual])

Step 9: Stop

Explanation:

The algorithm begins here

Step 1: Start

This gets the political parties as a list

Step 2: Parties = [All delegates in the party]

This counts the number of delegates i.e. the length of the list

Step 3: Lent = Count(Parties)

This initializes the first individual you come in contact with, to delegate 0 [list index begins from 0]

Step 4: Individual = 0

The next person on the list is set to index 1

Step 5: Index = 1

This begins an iteration

Step 6: For I in Lent:

If Parties[Individual] greets, shakes or smile to Party[i]

Step 6.1: If Parties[Individual] == Parties[I]:

Then they belong to the same party. Increment count by 1

Step 6.1.1: Index = Index + 1

If otherwise

Step 6.2: Else:

This checks if the first person is still in check

Step 6.2.1 If Index == 0:

If yes, the iteration is shifted up

Step 6.2.2: Individual = I

Step 6.2.3: Index = 1

If the first person is not being checked

Step 7: Else

The index is reduced by 1

Step 7.1: Index = Index - 1

This prints the highest occurrence party

Step 8: Print(Party[Individual])

This ends the algorithm

Step 9: Stop

The algorithm, implemented in Python is added as an attachment

Because there is an iteration which performs repetitive operation, the algorithm running time is: O(n)

Which is a potential disadvantage of emerging technologies? A. increased spread of misinformation due to advanced communication technologies B. inefficient usage of energy due to advanced manufacturing technologies C. only benefiting developed countries rather than developing ones D. slowing down global economic growth

Answers

Answer: I believe it’s D.

Explanation: Less developed countries may not be able to afford the new technology, while more developed ones will be able to do so. Meaning the less developed countries will most likely not change.

Which of these situations would benefit from the AutoRecover feature? Check all that apply.
You clicked Don't Save when you closed a file but later realized you did want that file after all.
You decided you wanted to rename a folder, but you could not remember what it was called.
Your computer crashed while bu were working on a file.
Your friend wants you to e-mail her a file.

Answers

Answer: Your friend wants you to email her.

Explanation:

Answer:

Its 1 and 3 on edge 2021

Explanation:

We investigated a program which is probably used as one component of a bigger password breaking algorithm. We determined that the program can input arbitrary N-bit queue and for actual N-bit input also the program output will be always N bits long. Additionally we noticed that the longer program input is, the longer will be the output calculating time. After performing some repeating tests we also determined that the program working time depends only and exactly on input length, not on the input itself.



Finally we fixed some actual working times:



-for N=10 - 10.576 seconds;

-for N=20 - 11.087 seconds;

-for N=25 - 13.544 seconds;

-for N=30 - 27.442 seconds;

-for N=35 - 1 minute 46.059 seconds;

-for N=40 - 9 minutes 10.784 seconds.



Task:



a) Find the program working time for N=50.

b) Please derive the mathematical formula using which is possible to calculate actual working time for arbitrary N.

Answers

Answer:

i dont know

Explanation:

PLEASE SOMEONE ANSWER THIS
If the old code to a passcode was 1147, and someone changed it, what would the new code be?

(I already tried 4117)



[I forgot my screen time passcode please someone help I literally can’t do anything on my phone.]

Answers

Answer:

Any of these?

Explanation:

1147. 4117. 7411

1471. 4171

1714. 4711

1741. 7114

1417. 7141

Answer:

1417

Explanation:

Rupesh wants to try programming with Eclipse. What is the first step he should take to make that happen?


download the Eclipse IDE

download the current Java Development Kit

create a restore point

disable his security program

Answers

Answer:

create a restore point

Explanation:

Write a function charInWord that takes in two parameters, a char (character) and a word (string). The program will return true if the character is in the word and false if it is not. If word is not a string type, or if char is not a string type, or if the length of char is greater than 1, the function should return None. Your main program should call the function and print char is in word if the function returns true, or char is not in word if the function returns false, using the user-supplied values instead of char and word. The program should print incorrect input provided if the function returns None. Ex: If the input is: a cat the output is: a is in cat Ex: If the input is: a club the output is: a is not in club Ex: If the input is: ab horse the output is:

Answers

Answer:

The program in Python, is as follows:

def charInWord(chr,word):

   if len(chr)>1:

       print("None")

   elif not(chr.isalpha() and word.isalpha()):

       print("None")

   else:

       if word.find(chr) == -1:

           print(chr+" is not in "+word)

       else:

           print(chr+" is in "+word)

chr = input("Character: ")

word = input("Word: ")

print(charInWord(chr,word))

Explanation:

This defines the function

def charInWord(chr,word):

This checks if the length of character is greater than 1

   if len(chr)>1:

If yes, it prints None

       print("None")

This checks if the character or the word contains invalid character

   elif not(chr.isalpha() and word.isalpha()):

If yes, it prints None

       print("None")

This is executed for valid parameters

   else:

If the character is not present, this is executed

       if word.find(chr) == -1:

           print(chr+" is not in "+word)

If the character is present, this is executed

       else:

           print(chr+" is in "+word)

The main begins here

This gets the character

chr = input("Character: ")

This gets the word

word = input("Word: ")

This calls the method and prints the required output

print(charInWord(chr,word))

Junie is researching Ancient Egypt. She found a website that is full of information and great
images. As she is reading the text, she notices that there are little bits of information that don't
really agree with any of the other research she has done. What should she do?
O Use the website. Most of the information seems correct.
OUse only the information that she needs and ignore the information that doesn't seem right.
O Ask her friend what he thinks about the website.
O Evaluate the site using the CARS checklist to see if the site is valid and reliable.

Answers

Answer: Evaluate the site using the CARS checklist to see if the site is valid and reliable.

Explanation:

Write a program in file MinMax.py that accepts an arbitrary number of integer inputs from the user and prints out the minimum and maximum of the numbers entered. The user will end the input loop by typing in the string 'stop'. When the user enters 'stop' your program should print out the minimum integer entered and the maximum integer entered. If the user enters 'stop' immediately (i.e., before any numbers are entered), you'll print a slightly different message. See the examples below: You can assume that the values entered are integers (positive, negative or zero) or the string 'stop' (lowercase). You don't have to validate the inputs. > python Min Max. py
Enter an integer or 'stop' to end: stop You didn't enter any numbers > python Min Max. py
Enter an integer or 'stop' to end: -10
Enter an integer or 'stop' to end: 0 Enter an integer or 'stop' to end: +42
Enter an integer or 'stop' to end: 87 Enter an integer or 'stop' to end: -100
Enter an integer or 'stop' to end: stop The maximum is 87 The minimum is -100

Answers

Answer:

The program is as follows:

numlist = []

num = input("'stop' to end: ")

while not (num == "stop"):

   numlist.append(int(num))

   num = input("'stop' to end: ")

   

if len(numlist) == 0:

   print("You didn't enter any numbers")

else:

   print("The maximum is "+str(max(numlist))+" and The minimum is "+str(min(numlist)))

Explanation:

This declares an empty list

numlist = []

This prompts the user for input

num = input("'stop' to end: ")

This loop is repeated until the user enters 'stop'

while not (num == "stop"):

This appends the input to the list

   numlist .append(int(num))

This prompts the user for input

   num = input("'stop' to end: ")

   

If the length of the list is 0, then the user entered no input

if len(numlist) == 0:

   print("You didn't enter any numbers")

If otherwise, this prints the min and the max

else:

   print("The maximum is "+str(max(numlist))+" and The minimum is "+str(min(numlist)))

The program that accepts an arbitrary number of integer inputs from the user and prints out the minimum and maximum of the numbers entered is as follows:

numbers = []

x = input("Enter an integer and stop to end: ")

while not(x == "stop"):

    numbers.append(int(x))

    x = input("Enter an integer and stop to end: ")

if len(numbers) == 0:

    print("You didn't enter any numbers ")

else:

    print(f"The maximum number is {max(numbers)} and the minimum number is {min(numbers)}")

Code explanation:

The code is written in python

The first line of code, we declared a variable named numbers and it is an empty list for storing our integers.The variable x is stores the user inputwhile the user's input is not lowercase "stop", the user's input is appended to numbers. Then the program ask for the users input as long as it is an integers inputif the length of the list is 0, then we print a statement to ask the user to enter a number.Else we print the maximum and minimum number of the user's input.

learn more on python code here: https://brainly.com/question/19175881

Jobs with only 7 letters

Answers

Answer:

nursing

Explanation:

it's needs 20 words so don't mind thisssss part hehe

Answer: Teacher!!!!!!

Read these sentences from the passage:
“The TV and the glasses work together. When the TV flashes the image meant for the right eye, the right lens is clear and the left lens is dark.

Which of the following describes the relationship between the first and second sentence?

Answers

Answer

It is B

Explanation:

Answer:

It's giving further information

Explanation:

Other Questions
Given STU and DEF , what is mE who was the goddesses names and what were they the gods of, in the tempest Which of the following causes the most problems in countries with low economic growth? poor education low unemployment higher standard of living rapid population increase What gas condenses into liquid in the sky to form clouds? What type of reaction is the following:2 Na + Cl2 -> 2 NaCldecompositiondouble replacementsingle replacementsynthesis Write an integer to represent the following situations.1. Loss of 5 kilograms2. 10 degrees below zero3. Overtime pay of 85.004. Spending P50.005. 12 years from now Compare the two box plots below. Which would have a larger IQR?Box-and-Whisker Plots ( Read ) | Statistics | CK-12 FoundationQuestion 4 options:A.They have the same IQRB. Varsity has a larger IQRC. Junior Varsity has a larger IQRD. There is not enough information provided What similarities in the development lead scientists to infer that opossums ,chickens, salamanders,and fish share a common ancestor? HELP ME NOW1)Sheila makes stuffed peppers. The model shows the ratio relationship for the ingredients.PeppersCups of Rice7What is the ratio of cups of rice to peppers?Choose all the correct answers.fo5:7O 7:507:12O 5 to 7O 7 to 5 A stalemate occurred for several years during the war mainly because both sides resorted to trench warfare. true or false Determine the latitude and longitude of a.London ,England b.Melbourne,Australia c.Buenos Aries ,Argentina please help fast!! How did Social Darwinism start to move this country from capitalism to socialism? Please Help ASAP!! Marking Brainliest!Writing Prompt: Was Civil War avoidable?Based on everything we learned and the events leading to the Civil War, do you believe the Civil War was avoidable? Refer back to these events and key people: Abolitionist movement, Nat Turners Rebellion, Harriet Tubman, Compromise of 1850, Missouri Compromise, Frederick Douglass, Dred Scott Case, the Cotton Boom, Southern reliance on agriculture and slavery, popular sovereignty, Kansas- Nebraska Act, Bleeding Kansas, Mexican Cession, Rise of the Republican Party, John Brown, Manifest Destiny, Sectionalism, Brooks canes Sumner on the Senate Floor and Fugitive Slave Act. Adter dinner, 3/4 of a pie ramains. If tasha eats 1/6 of the remaining pie, how much of the total pie does tasha eat? how has Technology affected the economy What is the length of QR?60020QRSelect the best answer from the choices provided. ans:5. After fighting two wars to stop this British drug trade, the Chinese government gave up control of what city? What caused this large empire to eventually fall? Modern readers are well aware that "A Modest Proposal" is ironic, but how do you think readers knew this in 1729? Where in the text does Swift (as author) reveal his true satiric intentions? Cite at least two pieces of evidence from the text to support your answer. PLEASE HELPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP