Computers and Technology

Write a c sharp program to create a class called tax with member variables price and method calcutotalprice() that determines the total. price including vat of price of a product given by ( vat*price)+price. nb: make a relevant declaration of vat and use 0.15 as the value of vat. the program must allow the user to enter value of price and display the total price including vat

answer
Answers: 3

Similar questions

Предмет
Computers and Technology, 17.10.2019 17:30, ashanty45
Write a class named car that represents a car. your car class should have the followning: 1. instance variablesi. make and model of the carii. color of the cariii. the car's priceiv. the car's mileage (total miles traveled, not miles per gallon)2. two overloaded constructorsi. a constructor that takes no parameters. this constructor should set the mileage to 0 and set some default values (use whatever you want ) for the make, model, color and price.ii. a constructor that allows you to set values for the make, model, color and price. this constructor should also set the mileage to 0.3. methodspublic void setprice(double p)this should update the instance variable for price with the specified value.public void paint(string c)this should "paint " the car by changing the instance variable for color with the specified value.public void displaycarinfo()this should display all available information on the car, including its make, model, coor, price, and mileage.public void travel(double distance)this should display a message saying that the car is traveling for the specified distance. this method should also increase the value of the mileage attribute accordingly.after the car class, write a separate client program containing a main method that does the following actions: 1. create two new car objects: a black porsche cayman s with a price of $ 63,800, and a blue nissan leaf with a price of $ 28,800.2. display information for each object by calling its displaycarinfo method.3. paint the cayman purple and the leaf green.4. make the cayman travel 12,000 miles and the leaf 8,000 miles.5. change the price of the cayman to $50,000 and the price of the leaf to $ 24,500.6. call displaycarinfo on each object again to see how the instance variables have changed.
Answers: 3
Do you know the correct answer?
Write a c sharp program to create a class called tax with member variables price and method calcutot...

Questions in other subjects: