Create a Time class and initialize it with hours and minutes.
1- Make a method displayTime which should print the time in hh:mm:ss format.
2- Make a method DisplayMinute which should display the total minutes in the Time. E.g.- (1 hr 2 min) should display 62 minutes
The
company wants to use a computerised system for selling their tyres. There are 2 types of
tyres in stock, namely those for luxury vehicles and those for construction vehicles.
4
Construction vehicle tyres cost twice the price of luxury vehicle tyres, and the prices
depend on the wheel size according to the following price list for luxury vehicles:
Wheel Size Price/Unit measurement ($)
Less than 10 Inches 3.50
10- 15 Inches 4.00
Greater than 15 inches 6.00
You are required to create a python program that implements the program according to
the following guidelines:
a) Create a class called Home, which contains a function called Details for receiving the
values of the type of vehicle, the size of the tyres and the number of tyres for the
vehicle.
b) Create a class called Construction which contains:
i) A constructor
ii) A function called Calc for doing relevant calculations for calculating the total price
of the tyres purchased for construction vehicles.
PRACTICAL: Question 6 (Marks: 10)
Create a PL/SQL query to display the customer name and total amount spent by each customer. In your solution determine the customer rating. If the total amount spent is greater than or equal to R 1000, the customer receives a star rating, otherwise no star rating applies.
Sample Output
FIRST NAME: Patrick
SURNAME: Smith
AMOUNT: R 700
----------------------------------------------------
FIRST NAME: Steven
SURNAME: Hewson
AMOUNT: R 570
----------------------------------------------------
FIRST NAME: Barry
SURNAME: Goodwin
AMOUNT: R 2500 (***)
----------------------------------------------------
Assume a file named
Random.txt
exists, and contains a list of random numbers. Write a program that opens the file, reads all the numbers from the file, and calculates the following:
The program should display the number of numbers found in the file, the sum of the numbers, and the average of the numbers.
Output Labels:
Print each of the above quantities on a line by itself, preceded by the following (respective) strings: "
Number of numbers:
", "
Sum of the numbers:
", and "
Average of the numbers:
".
Sample Run
Number of numbers: 20
Sum of the numbers: 210
Average of the numbers: 10.5
Write the pseudocode and flowchart for a vending machine
Create a windows desktop application which can be used by a local gardening service to determine the amount due by customers.
Your program should request the user to input the approximate length and breadth of the lawn, and whether cleaning the flower beds are included. Your program should then calculate and display the amount due, which is R8 per square meter of lawn, and a fixed cost of R60 if the flower beds needs to be cleaned.
PRACTICAL: Question 5 (Marks: 10)
Create a view called vwPetSalesDetails that will display the customer id, pet id, pet price and sales date. In your solution only display the sales that occurred between 15 March 2020 and 18 March 2020.