answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Aleksandr [31]
2 years ago
6

Meadowdale Dairy Farm sells organic brown eggs to local customers. It charges $3.25 for a dozen eggs, or 45 cents for individual

eggs that are not part of a dozen. Write a program that prompts a user for the number of eggs in the order and then display the amount owed with a full explanation. For example, typical output might be, You ordered 27 eggs. That’s 2 dozen at $3.25 per dozen and 3 loose eggs at 45 cents each for a total of $7.85. Save the program as Eggs.java.
Computers and Technology
1 answer:
svp [43]2 years ago
7 0

Answer:

Explanation:

import java.Util;

public class Eggs{

public static void main (String [] args)

{

int noOfEggs, dozen, units;

float total;

Scanner input = new Scanner(System.in);

noOfEggs = input.nextInt();

if(noOfEggs < 0)

{

System.out.print("Invalid");

}

else

{

if(noOfEggs >= 12)

{

dozen = noOfEggs/12;

units = noOfEggs % 12;

}

else

{

dozen = 0;

units = noOfEggs;

}

total = dozen * 3.25 + (units * 45)/100;

System.out.print("You ordered "+noOfEggs+" eggs.\n");

System.out.print("That's "+dozen+" dozen at $3.25 per dozen and "+units+" loose eggs at 45 cents each for a total of $"+total);

}

}

}

You might be interested in
When performing actions between your computer and one that is infected with a virus, which of the following offers NO risk of yo
DochEvi [55]
What are the options?
3 0
2 years ago
Read 2 more answers
What answer best explains why improper netiquette is considered dangerous? Individuals who violate user policies are often charg
adell [148]

Answer:

Students become vulnerable to cyberbullying and harassment.

Explanation:

3 0
2 years ago
Read 2 more answers
A student made a model of isostasy by placing a block of wood in a beaker of water. What does the wooden block represent in the
Komok [63]
I am almost positive the answer is B, Earth's crust. I know it cannot be A or C because isostasy has nothing to do with sea level or glaciers, and Earth's mantle is inside.
7 0
2 years ago
Read 2 more answers
Television broadcasts were originally delivered by using which technology
o-na [289]

Answer:

Wireless technology.

Explanation:

In earlier years, the broadcasting of information or any video or audio type was done "over-the-air". This means that sharing or the distribution of any content was done "wireless", through the use of transmitters that are wireless or requires no physical connecting wires.

Wireless technological form of broadcasting became the original form of distributing media, be it entertainment, news or information, etc. This 'over-the-air' broadcasting was then replaced by the cabled-wires transmission later on.

6 0
2 years ago
Show how to define a view tot_credits (year, num_credits), giving the total number of credits taken by students in each year
andreev551 [17]

Hi! I'm a Digital Marketer Intern at hotels.ng and I have a moderate knowledge on programming.

First, your  question is not very explanatory. The term "view" is often used in back-end web development. A view is simply a Python function that takes a Web request and returns a Web response.

But I'm not sure this is what you want, so I'll just go ahead and write a python function involving class to return the total number of credits taken by a student.

I'll answer this question using Python.

class student(object):  

    credits = None

    year = None

    def num_credits(self):


       #get credit value

       self.credits = input("Enter the total number of credits: "  )


       pass

    def getYear(self):

        self.year = input("Enter current year: ")

        pass

    def tot_credits(self):

          TotalCredits = tempTotalCredits + self.num_credits

           print "Your  total credits are :"+" "+str(TotalCredits)




3 0
2 years ago
Other questions:
  • Henry is creating a firewall rule that will allow inbound mail to the organization. what tcp port must he allow through the fire
    10·2 answers
  • Which are examples of copyrighted online materials? Check all that apply.
    14·2 answers
  • Claire writes a letter to her grandmother, in which she describes an amusement park she visited last week. She adds pictures of
    11·1 answer
  • For multicore processors to be used effectively, computers must understand how to divide tasks into parts that can be distribute
    6·1 answer
  • ANSI defines four events that signal the end of a transaction. Of the following events, which is defined by ANSI as being equiva
    14·1 answer
  • XYZ Corp.’s facilities in Nashua, New Hampshire, are two office buildings 400 feet apart, each with its own LAN. To connect the
    9·1 answer
  • You have enabled IPv6 on two of your routers, but on the interfaces you have not assigned IPv6 addresses yet. You are surprised
    10·1 answer
  • Flight Simulation software, which imitates the experience of flying, is often used to train airline pilots. Which of the followi
    10·2 answers
  • Design and document an IP addressing scheme to meet ElectroMyCycle’s needs. Specify which IP address blocks will be assigned to
    11·1 answer
  • Create a stored procedure named prc_inv_amounts to update the INV_SUBTOTAL, INV_TAX, and INV_TOTAL. The procedure takes the invo
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!