Robert has opened his own pet supply store so he can help himself to treats and toys whenever he wishes. In order to encourage customers to shop at his store more, he is implementing a customer loyalty program. For every $100 spent, the customer earns a 10% discount on a future purchase. If the customer has earned a discount, that discount will be automatically applied whenever they make a purchase. Only one discount can be applied per purchase. Implement a class Customer that represents a customer in Robert's store.

Answers

Answer 1

Answer:

Explanation:

The following code is written in Python and creates a class called customer which holds the customers name, purchase history amount, and current total. It also has 3 functions, a constructor that takes the customer name as a parameter. The add_to_cart function which increases the amount of the current total. And finally the checkout function which applies the available coupon and resets the variables if needed, as well as prints the info the to screen.

class Customer():

   customer = ""

   purchased_history = 0

   current_total = 0

   def __init__(self, name):

       self.customer = name

   def add_to_cart(self, amount):

       self.current_total += amount

   def checkout(self):

       if self.purchased_history >= 100:

           self.current_total *= 0.90

           self.purchased_history = 0

       else:

           self.purchased_history += self.current_total

       print(self.customer + " current total is: $" + str(self.current_total))

       self.current_total = 0


Related Questions

Define a function roll() that takes no arguments, and returns a random integer from 1 to 6. Before proceeding further, we recommend you write a short main method to test it out and make sure it gives you the right values. Comment this main out after you are satisfied that roll() works.

Answers

Answer:

Follows are the code to this question:

#include <iostream>//defining a header file

using namespace std;

int roll()//defining a method roll

{

return 1+(rand() %5);//use return keyword that uses a rand method

}

int main()//defining main method

{

cout<<roll();//calling roll method that print is value

return 0;

}

Output:

4

Explanation:

In this code,  the "roll" method is defined, that uses the rand method with the return keyword, that returns the value between 1 to 6, and in the next step, the main method is declared, that uses the print method to calls the roll method.

what 80s Disney movie was called the movie that nearly killed Disney? P.S. look it up

Answers

Answer:

The black cauldron

Explanation:

it was the most expensive animated film of its time ever made

Answer: The Black Couldren.

Explanation:

Play now? Play later?
You can become a millionaire! That's what the junk mail said. But then there was the fine print:

If you send in your entry before midnight tonight, then here are your chances:
0.1% that you win $1,000,000
75% that you win nothing
Otherwise, you must PAY $1,000

But wait, there's more! If you don't win the million AND you don't have to pay on your first attempt,
then you can choose to play one more time. If you choose to play again, then here are your chances:
2% that you win $100,000
20% that you win $500
Otherwise, you must PAY $2,000

What is your expected outcome for attempting this venture? Solve this problem using
a decision tree and clearly show all calculations and the expected monetary value at each node.
Use maximization of expected value as your decision criterion.

Answer these questions:
1) Should you play at all? (5%) If you play, what is your expected (net) monetary value? (15%)
2) If you play and don't win at all on the first try (but don't lose money), should you try again? (5%) Why? (10%)
3) Clearly show the decision tree (40%) and expected net monetary value at each node (25%)

Answers

Answer:

wow what a scam

Explanation:

Changing the color of the text in your document is an example of

Answers

Answer:

???????????uhhh text change..?

Explanation:

Answer:

being creative

Explanation:

cause y not?

Consider this scenario: A major software company finds that code has been executed on an infected machine in its operating system. As a result, the company begins working to manage the risk and eliminates the vulnerability 12 days later. Which of the following statements best describes the company’s approach?

Answers

Answer:

The company effectively implemented patch management.

Explanation:

From the question we are informed about a scenario whereby A major software company finds that code has been executed on an infected machine in its operating system. As a result, the company begins working to manage the risk and eliminates the vulnerability 12 days later. In this case The company effectively implemented patch management. Patch management can be regarded as process involving distribution and application of updates to software. The patches helps in error correction i.e the vulnerabilities in the software. After the release of software, patch can be used to fix any vulnerability found. A patch can be regarded as code that are used in fixing vulnerabilities

g Write a program that reads a list of words, and a character. The output of the program is every word in the list of words that contains the character at least once. For coding simplicity, follow each output word by a comma, even the last one. Assume at least one word in the list will contain the given character. The number of input words is always less than and equal to 10. If the user enters more than 10 words before the character, the program will output Too many words and exit.

Answers

Answer:

Here you go, alter this as you see fit :)

Explanation:

array = []

cnt = 0

while cnt < 11:

   x = input("Enter a word: ")

   array.append(x)

   cnt += 1

   y = input("Add another word?(Y/n):  ")

   if y.lower() == "n":

       break

letter = input("\nChoose a letter: ")

if len(letter) != 1:

   print("Error: too many characters")

   quit()

for n in range(len(array)):

   if letter.lower() in array[n].lower():

       print(array[n], end= ",")

What is a good slogan for digital citizenship?

Answers

Answer:

No matter where you are in the world you have a place to go to

Explanation:

In this world of globalization it makes sense you would be anywhere in the world and still have a place to go to.

Answer:

"If you are on social media, and you are not learning, not laughing, not being inspired or not networking, then you are using it wrong."

Explanation: (this is the freedom of speech not my words.) but there true even though and that we all (i dont know if its everyone but y'know) have to stay inside during this pandemic try to make the most of it!  

the keyboard,mouse, display,and system units are:​

Answers

Answer:

input devices?

Explanation:

Keyboard: It is used to give input through typing of the keys in keyboard. Mouse: It is used to give input through clicking mouse or selecting the options. System unit: It collectively defines the motherboard and CPU of the computer.

The keyboard, mouse, display, and system units are the four main components of a computer system.

Given that,

The devices are Keyboard, Mouse, Display, and System units.

A computer comprises hardware and software.

The hardware is the devices that are used for the input and output of the data.

The software is the devices that are integrated into the devices of the computer. This processes the data and provides the result.

The output devices show the result of our actions on the computer. Example: Screen.

The storage devices are used to store the data which are given as input. Example: Hard disk.

Thus, these all come under the hardware devices of the computer.

Read more on computer hardware here:

brainly.com/question/959479

#SPJ6

The return value is a one-dimensional array that contains two elements. These two elements indicate the rows and column indices of the largest element in the two-dimensional array. Write a test program that prompts the user to enter a two-dimensional array and displays the location of the largest element in the array.

Answers

Answer:

In Java:

import java.util.Scanner;  

import java.util.Arrays;  

public class Main  {  

public static void main(String args[])  {  

Scanner input = new Scanner(System.in);

int row, col;  

System.out.print("Rows: ");    row = input.nextInt();

System.out.print("Cols: ");     col = input.nextInt();  

int[][] Array2D = new int[row][col];

System.out.print("Enter array elements: ");

for(int i =0;i<row;i++){    

    for(int j =0;j<col;j++){

        Array2D[i][j] = input.nextInt();  

    }     }

 

int[] maxarray = findmax(Array2D,row,col);

System.out.println("Row: "+(maxarray[0]+1));

System.out.println("Column: "+(maxarray[1]+1));

}  

public static int[] findmax(int[][] Array2D,int row, int col)   {  

int max = Array2D[0][0];

int []maxitem = new int [2];

for(int i =0;i<row;i++){

    for(int j =0;j<col;j++){

        if(Array2D[i][j] > max){  

            maxitem[0] = i;

            maxitem[1] = j; } }    }

 

return maxitem;  

}  

}

Explanation:

The next two lines import the scanner and array libraries

import java.util.Scanner;  

import java.util.Arrays;  

The class of the program

public class Main  {  

The main method begins here

public static void main(String args[])  {  

The scanner function is called in the program

Scanner input = new Scanner(System.in);

This declares the array row and column

int row, col;

This next instructions prompt the user for rows and get the row input  

System.out.print("Rows: ");    row = input.nextInt();

This next instructions prompt the user for columns and get the column input  

System.out.print("Cols: ");     col = input.nextInt();  

This declares the 2D array

int[][] Array2D = new int[row][col];

This prompts the user for array elements

System.out.print("Enter array elements: ");

The following iteration populates the 2D array

for(int i =0;i<row;i++){    

    for(int j =0;j<col;j++){

        Array2D[i][j] = input.nextInt();  

    }     }

This calls the findmax function. The returned array of the function is saved in maxarray  

int[] maxarray = findmax(Array2D,row,col);

This prints the row position

System.out.println("Row: "+(maxarray[0]+1));

This prints the column position

System.out.println("Column: "+(maxarray[1]+1));

The main method ends here

}  

The findmax function begins here

public static int[] findmax(int[][] Array2D,int row, int col)   {  

This initializes the maximum to the first element of the array

int max = Array2D[0][0];

This declares maxitem. The array gets the position of the maximum element

int []maxitem = new int [2];

The following iteration gets the position of the maximum element

for(int i =0;i<row;i++){

    for(int j =0;j<col;j++){

        if(Array2D[i][j] > max){  

            maxitem[0] = i; -- The row position is saved in index 0

            maxitem[1] = j;  -- The column position is saved in index 1} }    }

This returns the 1 d array

return maxitem;  

}  

Where can I watch jersey shore for free
Pls don’t say soap2day, any apps or something?

Answers

Answer:

maybe try Y o u t u b e

Explanation:

sometimes they have full episodes of shoes on there for free

Compression algorithms vary in how much they can reduce the size of a document.
Which of the following would likely be the hardest to compress?
Choose 1 answer:

A. The Declaration of Independence

B. The lyrics to all of the songs by The Beatles

C. A document of randomly generated letters

D. A book of nursery rhymes for children

Answers

b the lyrics to all of the songs by the beatles !

The statement that represents the thing that would likely be the hardest to compress is a document of randomly generated letters. Thus, the most valid option for this question is C.

What is an Algorithm?

An algorithm may be characterized as a type of methodology that is significantly utilized for solving a problem or performing a computation with respect to any numerical problems.

According to the context of this question, an algorithm is a set of instructions that allows a user to perform solutions with respect to several numerical and other program-related queries. It can significantly act as an accurate list of instructions that conduct particular actions step by step in either hardware- or software-based routines.

Therefore, the statement that represents the thing that would likely be the hardest to compress is a document of randomly generated letters. Thus, the most valid option for this question is C.

To learn more about Algorithms, refer to the link:

https://brainly.com/question/24953880

#SPJ3

Write a program with the total change amount as an integer input, and output the change using the fewest coins, one coin type per line. The coin types are Dollars, Quarters, Dimes, Nickels, and Pennies. Use singular and plural coin names as appropriate, like 1 Penny vs. 2 Pennies. The input should be an integer, with the unit as "cents". For example, the input of 126 refers to 126 cents. 1 Dollar = 100 cents 1 Quarter = 25 cents 1 Dime = 10 cents 1 Nickel = 5 cents 1 Penny = 1 cent Ex: If the input is:

Answers

Answer:

In Python:

cents = int(input("Cents: "))

dollars = int(cents/100)

quarters = int((cents - 100*dollars)/25)

dimes = int((cents - 100*dollars- 25*quarters)/10)

nickels = int((cents - 100*dollars- 25*quarters-10*dimes)/5)

pennies = cents - 100*dollars- 25*quarters-10*dimes-5*nickels

if not(dollars == 0):

   if dollars > 1:

       print(str(dollars)+" dollars")

   else:

       print(str(dollars)+" dollar")

if not(quarters == 0):

   if quarters > 1:

       print(str(quarters)+" quarters")

   else:

       print(str(quarters)+" quarter")

if not(dimes == 0):

   if dimes > 1:

       print(str(dimes)+" dimes")

   else:

       print(str(dimes)+" dime")

if not(nickels == 0):

   if nickels > 1:

       print(str(nickels)+" nickels")

   else:

       print(str(nickels)+" nickel")

if not(pennies == 0):

   if pennies > 1:

       print(str(pennies)+" pennies")

   else:

       print(str(pennies)+" penny")

   

Explanation:

A prompt to input amount in cents

cents = int(input("Cents: "))

Convert cents to dollars

dollars = int(cents/100)

Convert the remaining cents to quarters

quarters = int((cents - 100*dollars)/25)

Convert the remaining cents to dimes

dimes = int((cents - 100*dollars- 25*quarters)/10)

Convert the remaining cents to nickels

nickels = int((cents - 100*dollars- 25*quarters-10*dimes)/5)

Convert the remaining cents to pennies

pennies = cents - 100*dollars- 25*quarters-10*dimes-5*nickels

This checks if dollars is not 0

if not(dollars == 0):

If greater than 1, it prints dollars (plural)

   if dollars > 1:

       print(str(dollars)+" dollars")

Otherwise, prints dollar (singular)

   else:

       print(str(dollars)+" dollar")

This checks if quarters is not 0

if not(quarters == 0):

If greater than 1, it prints quarters (plural)

   if quarters > 1:

       print(str(quarters)+" quarters")

Otherwise, prints quarter (singular)

   else:

       print(str(quarters)+" quarter")

This checks if dimes is not 0

if not(dimes == 0):

If greater than 1, it prints dimes (plural)

   if dimes > 1:

       print(str(dimes)+" dimes")

Otherwise, prints dime (singular)

   else:

       print(str(dimes)+" dime")

This checks if nickels is not 0

if not(nickels == 0):

If greater than 1, it prints nickels (plural)

   if nickels > 1:

       print(str(nickels)+" nickels")

Otherwise, prints nickel (singular)

   else:

       print(str(nickels)+" nickel")

This checks if pennies is not 0

if not(pennies == 0):

If greater than 1, it prints pennies (plural)

   if pennies > 1:

       print(str(pennies)+" pennies")

Otherwise, prints penny (singular)

   else:

       print(str(pennies)+" penny")

   

String[][] arr = {{"Hello,", "Hi,", "Hey,"}, {"it's", "it is", "it really is"}, {"nice", "great", "a pleasure"},

{"to", "to get to", "to finally"}, {"meet", "see", "catch up with"},
{"you", "you again", "you all"}};
for (int j = 0; j < arr.length; j++) {
for (int k = 0; k < arr[0].length; k++) {
if (k == 1) { System.out.print(arr[j][k] + " ");
}
}
}
What, if anything, is printed when the code segment is executed?

Answers

Answer:

Explanation:

The code that will be printed would be the following...

Hi, it is great to get to see you again

This is mainly due to the argument (k==1), this argument is basically stating that it will run the code to print out the value of second element in each array within the arr array. Therefore, it printed out the second element within each sub array to get the above sentence.

When the code segment is executed, the output is "Hi, it is great to get to see you again "

In the code segment, we have the following loop statements

for (int j = 0; j < arr.length; j++) {for (int k = 0; k < arr[0].length; k++) {

The first loop iterates through all elements in the array

The second loop also iterates through all the elements of the array.

However, the if statement ensures that only the elements in index 1 are printed, followed by a space

The elements at index 1 are:

"Hi," "it" "is" "great" "to" "get" "to" "see" "you" "again"

Hence, the output of the code segments is "Hi, it is great to get to see you again "

Read more about loops and conditional statements at:

https://brainly.com/question/26098908

List the three ways Python can handle colors.

Answers

Answer:

Try using coloramapackage in python for text colour & has cross platform support across Windows & Linux. It can also be used in conjunction with existing ANSI libraries like Termcolor. This approach would be better than manually printing ASCII sequences for text colouring on terminals. from colorama import Fore, Back, Style

Explanation:

Please help ASAP!
A career can include classes, experiences, jobs, and:

A. fields.

B. training.

C. regions.

D. laws.

Answers

b. training is the correct answer

You may have come across websites that not only ask you for a username and password, but then ask you to answer pre-selected personal questions about yourself. What can you conclude about this procedure and how it may increase your security?

Answers

Answer:

The questions are used to secure and identify you furthermore. Answering personal questions that only you can answer will deter someone from hacking into your account that easily.

Explanation:

Write a program which will enter information relating to a speeding violation and then compute the amount of the speeding ticket. The program will need to enter the posted speed limit, actual speed the car was going, and whether or not the car was in a school zone and the date of the violation. Additionally, you will collect information about the driver (see output for specifics). The way speeding tickets are computed differs from city to city. For this assignment, we will use these rules, which need to be applied in this order:

Answers

Answer:

In Java:

import java.util.*;

public class Main{

public static void main(String[] args) {

 Scanner input = new Scanner(System.in);

 float speedlimit, actualspeed;

 String ddate;

 int schoolzone;

 System.out.print("Speed Limit: ");

 speedlimit = input.nextFloat();

 System.out.print("Actual Speed: ");

 actualspeed = input.nextFloat();

 System.out.print("Date: ");

 ddate = input.nextLine();

 System.out.print("School Zone (1-Yes): ");

 schoolzone = input.nextInt();

 float ticket = 75;

 ticket += 6 * (actualspeed - speedlimit);

 

 if(actualspeed - speedlimit > 30){

     ticket+=160;

 }

 if(schoolzone == 1){

     ticket*=2;

 }  

 System.out.print("Date: "+ddate);

 System.out.print("Speed Limit: "+speedlimit);

 System.out.print("Actual Speed: "+actualspeed);

 System.out.print("Ticket: "+ticket);

}

}

Explanation:

See attachment for complete program requirements

This declares speedlimit and actualspeed as floats

float speedlimit, actualspeed;

This declares ddate as string

 String ddate;

This declares schoolzone as integer

 int schoolzone;

This prompts the user for speed limit

 System.out.print("Speed Limit: ");

This gets the speed limit

 speedlimit = input.nextFloat();

This prompts the user for actual speed

 System.out.print("Actual Speed: ");

This gets the actual speed

 actualspeed = input.nextFloat();

This prompts the user for date

 System.out.print("Date: ");

This gets the date

 ddate = input.nextLine();

This prompts the user for school zone (1 means Yes, other inputs means No)

 System.out.print("School Zone (1-Yes): ");

This gets the input for schoolzone

schoolzone = input.nextInt();

This initializes ticket to $75

 float ticket = 75;

This calculates the additional cost based on difference between speed limits and the actual speed

 ticket += 6 * (actualspeed - speedlimit);

If the difference between the speeds is greater than 30, this adds 160 to the ticket  

 if(actualspeed - speedlimit > 30){

     ticket+=160;

 }

If it is in a school zone, this doubles the ticket

 if(schoolzone == 1){

     ticket*=2;

 }  

The following print the ticket information

 System.out.print("Date: "+ddate);

 System.out.print("Speed Limit: "+speedlimit);

 System.out.print("Actual Speed: "+actualspeed);

 System.out.print("Ticket: "+ticket);

Write a function called count_types that returns a dictionary with keys that are Pokemon types and values that are the number of times that type appears in the dataset. The order of the keys in the returned dictionary does not matter. In terms of efficiency, your solution should NOT iterate over the whole dataset once for each type of Pokemon since that would be overly inefficient. For example, assuming we have parsed pokemon_test.csv and stored it in a variable called data:

Answers

Answer:

Explanation:

The following code is written in Python. It creates a function called count_types which takes in three parameters. The pokemon in question, the data set, and a dictionary with all the pokemon types and values (Empty to start). Then it simply uses the built-in Python count feature to count the number of times that the Pokemon appears in the data set. Finally it saves that pokemon as a key and count as a value to the dictionary.

def count_types(pokemon, data, my_dict):

   count = data.count(pokemon)

   my_dict += {pokemon: count}

Create a program that writes a series of random numbers to a file, then reads the file to calculate the average of those numbers, as well as the highest and lowest numbers. Prompt the user for how many random numbers they want to add to file. If the number is less than 100, add at least 100 numbers. Each random number should be between 10 and 500, inclusive (at least 10, no more than 500). Create the file as YourName_randomnumbers.txt (where YourName is your actual name or initials...) Once the program creates the file, open and read in all numbers. Loop through the numbers and determine the highest number, the lowest number, count how many entries are in the file, and calculate the average of all numbers. Remember to use functions and comment as needed. Submit your .py file and your randomnumbers.txt file.

Answers

Answer:

In Python:

import random

def average(content):

sum = 0

for i in range(0, len(content)):  

 content[i] = int(content[i])

 sum = sum + content[i]

print("Average: "+str(round(sum/len(content),2)))

def maxList(content):

print("Highest: "+str(max(content)))

def minList(content):

print("Lowest: "+str(min(content)))

f = open("YourName_randomnumbers.txt", "w")

num = int(input("Random Numbers: "))

if num < 100:

num = 100

for i in range(1,num+1):

f.write(str(random.randint(10,500)))

f.write(" ")

f.close()

with open('YourName_randomnumbers.txt') as ff:

content = ff.read().split()

print("Entries: "+str(len(content)))

average(content)

maxList(content)

minList(content)

Explanation:

First, we import the random module

import random

The program uses functions. The first is the average function

def average(content):

This initializes sum to 0

sum = 0

This iterates through the list and adds up the list elements

for i in range(0, len(content)):

 content[i] = int(content[i])

 sum = sum + content[i]

This prints the average, rounded to 2 decimal places

print("Average: "+str(round(sum/len(content),2)))

The maxList function begins here

def maxList(content):

This gets and prints the highest of the list

print("Highest: "+str(max(content)))

The minList function begins here

def minList(content):

This gets and prints the lowest of the list

print("Lowest: "+str(min(content)))

The main begins here

This createa a file and prepares it for write operations

f = open("YourName_randomnumbers.txt", "w")

This prompts user for number of random numbers

num = int(input("Random Numbers: "))

If user input is less than 100

if num < 100:

It is set to 100

num = 100

The following iteration generates random numbers between 10 and 500 and inserts the random number to file

for i in range(1,num+1):

f.write(str(random.randint(10,500)))

f.write(" ")

Close file

f.close()

The following iteration reads the file content into a list

with open('YourName_randomnumbers.txt') as ff:

content = ff.read().split()

This prints the number of entries

print("Entries: "+str(len(content)))

The next three instructions calls the average, maxList and minList functions respectively

average(content)

maxList(content)

minList(content)

What is the value of the variable answer after the following code is executed?
String strl = "apple", str2 = "banana";
boolean answer = stri.equals(str2) && (stri.length() < str2.length());
true
false

Answers

Answer:

false

Explanation:

Define the _make method, which takes one iterable argument (and no self argument: the purpose of _make is to make a new object; see how it is called below); it returns a new object whose fields (in the order they were specified) are bound to the values in the interable (in that same order). For example, if we called Point._make((0,1)) the result returned is a new Point object whose x attribute is bound to 0 and whose y attribute is bound to 1.

Answers

This picture will show you the answer and guide the way to victory

We can actually see that the _make method is known to be a function that creates named tuple type.

What is _make method?

_make method is seen in Python programming which is used to create a named tuple type instantly. It can be used for conversion of objects e.gtuple, list, etc. to named tuple.

Thus, we see the definition of _make method.

Learn more about Python on https://brainly.com/question/26497128

#SPJ2

— If NOT temp == 32.0 Then. Set temp = 32.0. End If.
What is the error

Answers

Answer:

im sorry so sorry i needed the pts

Explanation:

Which term refers to a solution to a large problem that is based on the solutions of smaller subproblems. A. procedural abstraction B. API C. modularity D. library

Answers

Answer:

procedural abstraction

Explanation:

The term that refers to a solution to a large problem that is based on the solutions of smaller subproblems is A. procedural abstraction.

Procedural abstraction simply means writing code sections that are generalized by having variable parameters.

Procedural abstraction is essential as it allows us to think about a framework and postpone details for later. It's a solution to a large problem that is based on the solutions of smaller subproblems.

Read related link on:

https://brainly.com/question/12908738

Giving brainliest if you answer question.

Answers

The length of the inclined plane divided by the vertical rise, or you can call it run to rise ratio. The mechanical advantage would increase as the slope of the incline decreases, but problem is that the load will have to go a longer distance. The mechanical advantage would be slope of the incline. I also got confused on a question like this and did some research. Hope this helps!

A marketing plan includes a number of factors, including the marketing mix.
What is the marketing mix?
A. The variables of product, price, place, and promotion
B. Using names and symbols to ideny the company's products
C. How the company intends for customers to view its product
relative to the competition
D. A plan for spending money
SUBMIT

Answers

A marketing plan includes a number of factors, including the marketing mix.
What is the marketing mix?
A. The variables of product, price, place, and promotion

Find an overall minimum two-level circuit (corresponding to sum of products expressions) using multiple AND and one multi-input OR gate per function for the following set of functions. Show a K-map for each function, and draw the final two-level circuit. You will have to share terms between F and G to find the minimum circuit.
F(a, b, c, d) = m(0, 1, 2, 3, 6, 7, 8, 10, 12, 13)
G(a, b, c, d) = {m(0, 1, 2, 3, 8, 9, 10, 13)

Answers

Answer:

si la pusiera en español te pudiera responer

A car dealership needs a program to store information about the cars for sale. For each car, they want to keep track of the following information number of doors (2 or 4), whether the car has air conditioning, and its average number of miles per gallon. Which of the following is the best design?
a. Use classes: Doors, Airconditioning, and MilesPerGallon, each with a subclass Car.
b. Use a class Car, with subclasses of Doors, Airconditioning, and MilesPerGallon.
c. Use a class Car with three subclasses: Doors, Airconditioning, and MilesPerGallon.
d. Use a class Car, with fields: numDoors, hasAir, and milesPerGallon.
e. Use four unrelated classes: Car, Doors, Airconditioning, and MilesPerGallon.

Answers

Answer:

The answer is "Choice d".

Explanation:

In this topic, the option d, which is "Use a class Car, with fields: numDoors, hasAir, and milesPerGallon" is right because the flag, if air-conditioned, of its numbers of doors, was its average kilometers per gallon, qualities of either an automobile, in which each one is a basic value so that they're being fields of a class of cars.

The best design for the given program will be;

D: Use a class Car, with fields: numDoors, hasAir, and milesPerGallon.

What is the best design for the program?

In this question, the best design for the program to keep track of the number of doors (2 or 4), whether the car has air conditioning, and its average number of miles per gallon is to "Use a class Car, with fields: numDoors, hasAir, and milesPerGallon"

That option is right because has classified the cars with the accurate parameters to be searched which are its numbers of doors, average miles per gallon, air condition.

Read more about programming at; https://brainly.com/question/22654163

What is the output of the following code snippet if the variable named cost contains 100? if cost < 70 or cost > 150 : discount = 0.8 * cost else : discount = cost print("Your cost is ", discount)

Answers

Answer:

The output is: Your cost is  100

Explanation:

Given

The above code snippet

and

[tex]cost = 100[/tex]

Required

Determine the output of the code

if cost < 70 or cost > 150

The above condition checks if cost is less than 70 or cost is greater than 150

This condition is false because 100 is neither less than 70 nor is it greater than 150

So, the else statement will be executed.

discount = cost

Which means

discount = 100

So, the print instruction will print: Your cost is  100

Does modern technology make our lives better,worse ,or doesn’t really make a change in your life ?Whats your opinion ?

Answers

It makes life better. Easy to communicate, everything you need is at your disposal, from whether forecasts to a calculator on your phone

what does coding mean​

Answers

the process or activity of writing computer programs.

Answer: Computer coding is the use of computer programming languages to give computers and machines a set of instructions on what actions to perform. It's how humans communicate with machines. It's what allows us to create computer software like programs, operating systems, and mobile apps.

Explanation: I hope that helps

Other Questions
1) What is the receptors role in the homeostatic control mechanisms?A) Sets the control pointB) Recognizes the variableC) Determines the best responseD) Sends the message to the variable2) What is it called when areolar tissue collects water?A) EdemaB) InflammationC) OsmosisD) Tissue collection what is Which expression is equivalent to 9y 3y?333y3y666y please help A bottled water company runs a promotion in which 1 out of every 4 bottles has the word "Winner" printed under thecap. Winners receive a free bottle of water. A store owner notices that in the last 4 bottles of water purchased, 2have been winners. Using the table, what is the probability of getting 2 or more "Winner" caps on 4 bottles of water? On April 1 of the current year, Morgan Jones established a business to manage rental property. She completed the following transactions during April: Opened a business bank account with a deposit of $60,000 in exchange for common stock. Purchased office supplies on account, $1,800. Received cash from fees earned for managing rental property, $22,300. Paid rent on office and equipment for the month, $7,000. Paid creditors on account, $1,100. Billed customers for fees earned for managing rental property, $3,600. Paid automobile expenses for month, $750, and miscellaneous expenses, $1,000. Paid office salaries, $4,000. Determined that the cost of supplies on hand was $250; therefore, the cost of supplies used was $1,550. Paid dividends, $5,000. Required: 1. Indicate the effect of each transaction and the balances after each transaction: For those boxes in which no entry is required, leave the box blank. For those boxes in which you must enter subtractive or negative numbers use a minus sign. (Example: -300) Figue out the measures Solve the equation: -5 = (-13) 6 What did Bull Connor order the police to do because he feared the jails would fill? Attack the children with fire hoses and dogs. Close all of the city parks. Repeal the segregation laws. Bomb Reverend Shuttlesworth home. Why Filipinos and Japanese celebrate the lantern festival How does the method of reproduction differ in each of the three species? Which phrase suggests feedback?Richard and his team recently developed a software application. They used the latest technologies in programming to code the software. Ateam of developers coded the application another team tested it. The database team developed the backend. The client highly appreciatedRichard and his team. They also gave suggestions on some modules and said they would like to work with his team in the future. What's the formula to creating a thesis statement? ASAP! This is due tonight!! spanish please help thank youuu A driver pushes on a car with a force of 8000 N for 15 seconds but is unable to move it. How much work is done What is one thing that is important for an audience to understand about the characters in "A Raisin in the Sun"? Which word correctly completes the sentence?Est nublado. El sol est cubierto por las nubes y hace fresco. Est ____A. calorB. nubeC. lloviendoD. tiempo Before You BeginChoose one of the Civil War topics listed below. Using the library and the Internet, find one research source about the topic. Your source should be at least five hundred words in length, or, if you select a print source, at least four to five pages.Choose one topic:a major Civil War battleCivil War munitions and uniformsthe Emancipation Proclamationthe Gettysburg AddressAfter you find your source, you should meet with your teacher to get it approved before moving on to the next step.Good readers rely on a set of skills to help them understand a text. You can use these strategies as you read the research source about the Civil War.If possible, print a version of the text that you can write on. It is helpful to highlight key points and make notes in the margins. This strategy is called annotating.When you find words or phrases that you do not know, do not skip over them. There is a series of steps you can take to understand the meaning of these words and phrases, so that you do not miss out on key ideas.Context clues: Look at the words before and after the unknown word or phrase. Using the surrounding text, or context, can you find any clues to the meaning of the unknown word?Using a dictionary: To find the specific meaning of a word, including helpful information like part of speech, word origin, and multiple meanings, you can use a dictionary. There are both print and online dictionaries available.Using an encyclopedia: Some words or phrases may have an important historical or contextual meaning behind them, especially in a social studies or history text. In this case, an encyclopedia is an excellent resource. For example, you would not want to simply use a dictionary to look up George Washington; in fact, an encyclopedia would provide you with a clearer meaning.After annotating the text, go back and read the text one more time. You might notice new details that you missed the first time.After you have finished reading the text a second time and have defined any unknown words, jot down some notes about the key points or ideas. It can be helpful to write a quick summary of the source in order to prepare you for your next step: writing a report.DirectionsChoose one Civil War topic from the list below. Research your topic using the library and the Internet. Then, write a report of at least four hundred words.a major Civil War battleCivil War munitions and uniformsthe Emancipation Proclamationthe Gettysburg AddressMake sure you correctly cite your research source or sources in your writing. What place is the digit 3 in the number 6,257.839 Which act showed that Koblai Khan intended to make his mark as an emperor of China?He extended the borders of his empire eastward into Japan and Korea.He insisted that trade be open between the Eurasian steppe and China.He allowed the Chinese to keep their religion and culture.He moved the capital to the site of modern day Beijing (built a palace with a wall). Multiply. (x-6)(x+4) with work. What is most important to Kira in gathering blue