Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Help Exercise#2 (1 point): Write a Java program for a car merchant, who would like to calculate the total profit from selling cars. The program

Help

image text in transcribed

Exercise#2 (1 point): Write a Java program for a car merchant, who would like to calculate the total profit from selling cars. The program should input car's original price, selling price and number of sold cars. Therefore, the profit is equal to incomes - expenses). The output should be like this: Car's original price: 20000AED Saris selling price: 25000AED No. of cars to be sold: 23 ******** Profit= 575000 - 460000 = 115000 AED Exercise#3 (1 point): Repeat exercise 2 here, but read the input from a file instead from a user and print the output to a file instead of console as shown below: Output File Sample: Car's original price: 20000 AED Car's selling price: 25000AED No. of cars to be sold: 23 Input File Sample: 20000 25000 23 Profit - 575000 - 460000 - 115000 AED

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

DB2 Universal Database V7.1 Application Development Certification Guide

Authors: Steve Sanyal, David Martineau, Kevin Gashyna, Michael Kyprianou

1st Edition

0130913677, 978-0130913678

More Books

Students also viewed these Databases questions