The cost to ship a package is a flat fee of 75 cents plus 25 cents per pound. 1. Declare a constant named CENTS_PER_POUND and initialize with 25. 2. Get the shipping weight from user input storing the weight into shipWeightPounds. 3. Using FLAT_FEE_CENTS and CENTS_PER_POUND constants, assign shipCostCents with the cost of shipping a package weighing shipWeightPounds.
Q: Q2: Write a FORTRAN90 program that reads a student ID and his GPA out of 4.0. The program should…
A: According to the asked question, the solution is given below with a proper explanation.
Q: Write a program for The Carefree Resort named ResortPrices that prompts the user to enter the number…
A: C# is a general purpose multi-paradigm programming language developed and used by Microsoft. It…
Q: Write a program for calculating the simple interest on a loan when the initial prin- cipal amount…
A: PROGRAM CODE: public class Main{ public static void main(String[] args) {…
Q: Suppose you are a computer salesman and your income depend on the total sales and commissions earned…
A: Given:- income=total_sale+Commision; Commision=total_sale*Commision_rate;
Q: Write a temperature-conversion program that gives the user the option of converting Fahrenheit to…
A: The program is written in python def CtoF(): celsius = float(input("Enter temperature in…
Q: Write aC++program that allows a user to enter their rating of the three movies in the DarkKnight…
A: [Note: Explanation of the program code is provided within the comments.] Program code:…
Q: Write a program that calculates the cost of travelling using a private jet. The program must request…
A: for input from user: Console.WriteLine("Enter name of the destination and the distance(in km) of the…
Q: Write a program ShippingCharges.cpp that asks for the weight of the package and the distance it is…
A: Use an if else structure to validate the values and then use if else if ladder to calculate amount
Q: 1. What is the output of the following code snippet? int num = 50; if (num > 50); { num = num 5; }…
A: The given C++ code, Initializes the value of "num" as 50. Using "if" condition, the condition…
Q: The owners of the Annan Supermarket would like to have a program that computes the weekly gross pay…
A: Define the class Employee with data members as pay rate for hour, hours worked, first name and last…
Q: Write a program for the Animal Express delivery company. The company charges by the kilogram for…
A: Python used to answer this question
Q: Write a program that calculates the cost of 3 bags of fruit. The 4 possible fruits are pears which…
A: A loop is used to execute a block of code several times. The number of iterations is based on a…
Q: Write a program that converts U.S. dollars toCanadian dollars, German marks, and British pounds, as…
A: Program: import java.text.NumberFormat; import java.util.Locale; import…
Q: Write a program that asks the user to enter an amount of money in the format of dollars and…
A: Program: quarters = 0 dimes = 0 nickels = 0 pennys = 0 print("Please enter aomunt in the…
Q: Write a program that displays a simulated paycheck. The program should ask the user to enter the…
A: Define header file <iostream>, <cstring> , <string> and <iomanip>. Define…
Q: Write a program that reads from the user the initial Kilometers of the car, the current Kilometers…
A: Java program for the above fuel consumption problem is given below in step 2.
Q: You are working for a lumber company, and your employer would like a program that calculates the…
A: Since you are not specifying any language for implementation, I am using C++. Program #include…
Q: You are to write a simple program that asks the user for input, processes theinput, and then outputs…
A: Answer :
Q: Write a program to read basic salary (bsalary) and sales (sales) then calculate and print the net…
A: C++ program for above : #include <bits/stdc++.h> using namespace std; int main() {…
Q: Write a program that will take as input the type of restaurant the user ate at, the cost of the…
A: Use if else if conditions to check each type and add tax in every case
Q: Write and test a well commented program which helps an insurance broker determine insurance premiums…
A: Actually, program is an executable software that runs on a computer.
Q: Your program will calculate the cost of orders on Amazon.com witha quantity and price, and add…
A: Program in Java: import java.io.*;public class Ordering_System{ public static void main(String…
Q: Implement the following: Given: food1 = "Salad" food2 = "Sandwich" price1 = 3.6 price2 = 4.99 Print…
A: food1 = "Salad"food2 = "Sandwich"price1 = 3.6price2 = 4.99 print("Lunch:", food1, f"{'' : <25}",…
Q: You have a red lottery ticket showing ints a, b, and c, each of which is 0, 2. If they are all the…
A: Given:
Q: Write a program for the Animal Express delivery company. The company charges by the kilogram for…
A: The python code is shown in the following steps.
Q: In this assignment, you are going to complete a program that compute gross and net payment based on…
A: code in java : ======================================================== import java.util.*;import…
Q: A java program that works out the charges for the month. The program should accept the following on…
A: //import the required package import java.util.Scanner; //Definition of the main class public class…
Q: Write a method named presentValue that performs this calculation. The method should accept the…
A: We know that the amount we get for a principal P after t years is P + PTR/100 So, according to the…
Q: 1. Write a simple program to determine the credit card types according to annual income and user…
A: #include <iostream> using namespace std; int main(){ int inc,interest;…
Q: Write a program that will calculate and print out bills for the city water company. The water rates…
A: The two inputs are char and float. Code is either H, C, or I. This is input to the switch statement.…
Q: BMI Calculation
A: Program: // C++ Version 14#include <iostream>#include <cmath>using namespace std;//…
Q: Write a program that lets the user enter the loan amount and loan period in number of years and…
A: Program in java for calculation of monthly and total payments for each interest rate. import…
Q: A client in a store is buying 5 items: shirt, trouser, hat, shoes, and perfume. Write a program that…
A: According to the asked question, the solution is given below with a proper explanation.
Q: The cost to ship a package is a flat fee of 75 cents plus 25 cents per pound. 1. Declare a constant…
A: Given:
Q: You are working for a lumber company, and your employer would like a program that calculates the…
A: Program Approach: Declare necessary variables in main function. Define float bf method which…
Q: A sales event at Trader Jane's is reducing some items by 25%. Store that value to a properly named…
A: Introduction of Program The C++ Program provided with the Reducing Offer and the Sales Tax values of…
Q: Write a simple payroll program that will display the employee's information, The program should…
A: Question given: Write a Java program that display employee's payroll information. Ask from user…
Q: Q2. Write a program that reports the contents of a compressed-gas cylinder based on the first letter…
A: C program
Q: The manager of a football stadium wants you to write a program that calculates the total ticket…
A:
Q: Write a unit conversion program that asks the users from which unit they want to convert (gal, oz,…
A: //Code In Java import java.util.*; public class Main{ public static void main(String[] args) {…
Q: Q4: Write a FORTRAN90 program that reads a student ID and his GPA out of 4.0. The program should…
A: Algorithm: Start Read student ID and GPA If gpa>=3.5 then print "EXCELLENT" Else if gpa<3.5…
Q: Ask for and get three doubles from the user; the numbers represent the values for a, b, and c that…
A: Roots of a quadratic equation : The roots of a quadratic equation, can be calculated by using the…
Q: The cost to ship a package is a flat fee of 75 cents plus 25 cents per pound. 1. Declare a constant…
A: The program takes ship weight in pounds as input from the keyboard. we know the values of the flat…
Q: 3. A fast food restaurant sells the following products: Product Burgersteak Softdrinks Price PhP…
A: I have given C++ code to count the total amount paid by customer to by products.
Q: CREATE A PROGRAM THAT ASKS THE USER IF HE/SHE IS PWD OR SENIOR CITIZEN IF YES, THEN GIVE 20% OFF IF…
A: As no programming language is mentioned here, we are writing this program in python price =…
Q: Write a program that calculates the attendance percentage for students, there are total 120 working…
A: Note: In this question the coding language is not specified then we are doing this question in the…
Q: C# Write a program for The Carefree Resort named ResortPrices that prompts the user to enter the…
A: Algorithm: Start Read enter the number of days for a resort stay n If n==1 or n==2,calculate cost…
Q: Write a program for the Animal Express delivery company. The company charges by the kilogram for…
A: Note: Since no programming language is mentioned. I am attempting this in python. if you need it in…
The shipWeightPounds needs to be taken by the user.
Also, it will be better to convert the final cost in dollars than in cents.
The program asks to calculate the shipping cost, thus only shipping cost should be the output not other data.
Trending now
This is a popular solution!
Step by step
Solved in 4 steps with 2 images
- Java jframe 6 Cell Phone PackagesCell Solutions, a cell phone provider, sells the following packages:300 minutes per month: $45.00 per month800 minutes per month: $65.00 per month1500 minutes per month: $99.00 per monthThe provider sells the following phones (a 6 percent sales tax applies to the sale of a phone):Model 100: $29.95Model 110: $49.95Model 200: $99.95Customers may also select the following options:Voice mail: $5.00 per monthText messaging: $10.00 per monthWrite an application that displays a menu system. The menu system should allow the userto select one package, one phone, and any of the options desired. As the user selects itemsfrom the menu, the application should show the prices of the items selectedTODO 2 Complete the TODO by finding the locations of the data samples for each iris flower type. Hint: Use the code for how we found all the setosa_locs as an example! Using iris_df, find the location of all the data sample locations for the versicolor class which has a label of 1. To do so, use NumPy's np.where() function. Using iris_df, find the location of all the data sample locations for the virginica class which has a label of 2. To do so, use NumPy's np.where() function. setosa_locs = np.where(iris_df['class'] == 0)[0] # TODO 2.1versicolor_locs = # TODO 2.2virginica_locs = todo_check([ (type(versicolor_locs) is np.ndarray, "'versicolor_locs' is not type np.ndarray. Make sure you indexed np.where() currently!"), (type(virginica_locs) is np.ndarray, "'virginica_locs' is not type np.ndarray. Make sure you indexed np.where() currently!"), (versicolor_locs[0] == 50, "'versicolor_locs' has an incorrect value"), (virginica_locs[0] == 100, "'virginica_locs' has an…CHALLENGE ACTIVITY 7.10.2: Unit testing of a class. Write a unit test for addInventory(), which has an error. Call redSweater.addInventory() with parameter sweaterShipment. Print the shown error if the subsequent quantity is incorrect. Sample output for failed unit test given initial quantity is 10 and sweaterShipment is 5:Beginning tests. UNIT TEST FAILED: addInventory() Tests complete. Note: UNIT TEST FAILED is preceded by 3 spaces.
- Java question please Create a class called Account that has the following attributes: Account Client - AccountHolder Double - Balance Date - DateCreated Account() Account(Client AccountHolder, Double Balance) getAccountHolder() - Client setAccountHolder(Client) - void getBalance() - Double deposit(Double) - Double withdrawal(Double) - Double getDateCreated() - Date toString() - String compareTo(Account) - Integer equals(Account) - Double Notes: The account holder attribute will link to the Account class that you created in problem 6. Your constructor and overloaded constructor should set the date created to the current date. Your deposit method should add to the balance Your withdrawal method should remove from the balance, as long as there is enough money to withdrawalDone in javaFx and the Listing 10.2 (Loan.java) is down below. public class Loan {private double annualInterestRate;private int numberOfYears;private double loanAmount;private java.util.Date loanDate; /** Default constructor */public Loan() {this(2.5, 1, 1000);} /*** Construct a loan with specified annual interest rate, number of years and* loan amount*/public Loan(double annualInterestRate, int numberOfYears, double loanAmount) {this.annualInterestRate = annualInterestRate;this.numberOfYears = numberOfYears;this.loanAmount = loanAmount;loanDate = new java.util.Date();} /** Return annualInterestRate */public double getAnnualInterestRate() {return annualInterestRate;} /** Set a new annualInterestRate */public void setAnnualInterestRate(double annualInterestRate) {this.annualInterestRate = annualInterestRate;} /** Return numberOfYears */public int getNumberOfYears() {return numberOfYears;} /** Set a new numberOfYears */public void setNumberOfYears(int numberOfYears)…Create a class of Customer with custName, custAddress, custCnic, custPhone, custType. Create another class of Employee with empName, empAddress, empCnic, empPhone, empType (tele-callrs , doc boy, sales executive , back office). You have to provide both default and parametrized constructors.
- I need help moding this Java code to follow the picture. import java.awt.event.*; import javax.swing.*; class Main { public static void main(String args[]) { JFrame myframe= new JFrame("Hello App"); JLabel lblMessage=new JLabel(); lblMessage.setBounds(100,50, 250,12); myframe.add(lblMessage); JTextField txtBox1; txtBox1=new JTextField("Enter your first name"); txtBox1.setBounds(100,88, 150,30); myframe.add(txtBox1); JButton btnSubmit=new JButton("Submit"); btnSubmit.setBounds(100,170, 88,30); myframe.add(btnSubmit); btnSubmit.addActionListener(new ActionListener(){ public void actionPerformed(ActionEvent e){ String msg="Hello "+txtBox1.getText(); lblMessage.setText(msg); } }); JButton btnReset=new JButton("Reset"); btnReset.setBounds(244,170, 88,30); myframe.add(btnReset); btnReset.addActionListener(new ActionListener(){ public void actionPerformed(ActionEvent e){ lblMessage.setText(""); txtBox1.setText("Enter your first name"); } });…Add a new endpoint to your API Use Promises and setTimeout to make all of your functions asynchronous. The endpoint will be /specialOperation This endpoint will take the parameters: length, width, and grade It will asynchronously (with your utility module) get the grade result and rectangle result. It will look something like this: {"gradeStats":{"average":86.25,"minimum":73,"maximum":97},"rectangle":{"area":8,"perimeter":12}} Use promises (obvi). Notes Do not make your utility module functions take an entire req object. const express = require("express"); const session = require("express-session"); const dotenv = require("dotenv"); dotenv.config(); const app = express(); app.use(session({ secret:"secret-key", resave: false, saveUninitialized: false, })); app.use((req, res, next) => { if (!req.session.commandCount) { req.session.commandCount = 0; } if (!req.session.lastCommand) { req.session.lastCommand = ""; } next();…APEX - Salesforce Write an Apex Class to Multiply two numbes and show in the Console and please add proper comments and output? Note : plagrised content will be down voted
- You have a group of friends coming to visit for your high school reunion, and you want to take them out to eat at a local restaurant. You are not sure if any of them have dietary restrictions, but your restaurant choices are as follows: Joe’s Gourmet Burgers—Vegetarian: No, Vegan: No, Gluten-Free: No Main Street Pizza Company—Vegetarian: Yes, Vegan: No, Gluten-Free: Yes Corner Café—Vegetarian: Yes, Vegan: Yes, Gluten-Free: Yes Write a program that asks whether any members of your party are vegetarian, vegan, or gluten-free, to which then displays only the restaurants to which you may take the group.Implement the ShoppingCart and Product class with necessary properties so that the given output is produced. Do not change any given code.s1 = ShoppingCart()p1 = Product("Razer BlackShark","Headset",99.99,5)p2 = Product.createProduct("Razer Huntsman","Keyboard",249.99,12)print("1.====================================")s1.addGadget(p1,p2)print("2.====================================")s1.setCartName("Amazon")s1.addGadget(p1,p2)s1.addGadget(Product("HyperX Fury","Mousepad",26.99,21))print("3.====================================")print("Total Products created:",Product.totalProducts)print("4.====================================")s1.printCartDetails()print("5.====================================")s1.removeFromCart("Logitech G ProX Superlight")print("6.====================================")s1.removeFromCart("Razer Huntsman")print("7.====================================")s1.printCartDetails()Output:1.====================================Please set the cart name…Suppose you can buy chocolate bars from a vending machine for $1 each.Inside every chocolate bar is a coupon. You can redeem 7 coupons for 1chocolate bar from the machine.For example, if you have $20, you can initially buy 20 chocolate bars.This gives you 20 coupons. You can redeem 14 coupons for 2 additionalchocolate bars. These 2 chocolate bars have 2 more coupons, so you now have atotal of 8 coupons. This gives you enough to redeem for 1 final chocolate bar.Write a recursive function that would accept the amount of dollars andcoupons as its parameters and output the total number of chocolate bars thatcan be bought (including those redeemed via coupons).Write a test program in C++that would allow the user to enter amount of dollarsand then use the recursive function to compute the number of chocolate barsthe user can buy, and output the number to the screen.