Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Search & Filtering

You are requested to write a very simple calculator. Calculator should be able to handle the five basic mathematic operations – add, subtract, multiply, divide and modulus – on two input values. Your program should have the following structure:





Ask the user to enter two float variables named var1 and var2





Ask the user to enter a character variable named operation to represent the operation to be





performed on the two variables.





Perform the appropriate operation by using if-statements





The output must be given in fixed-point notation with two digits after the decimal point

Teacher at Leva P School needs to divide her class in different group sizes due to activity they have to do. Help her to prepare workstations for each group. For art projects the class divided in groups of 6; science projects in groups of 4. She asked to write program to get number of groups and number of pupils left to form a smaller group. There are 56 pupils in the class.

Declare three int variables nrPupils, nrGroups, and nrLeft. nrPupils represents the

number of pupils in a class, nrGroups number of groups the class divided into, and nrLeft number of pupils remaining smaller group. Assign the value 56 to nrPupils. Declare an int variable groupSize that is used by a cin statement to input a value from the keyboard and store the size of the groups the teacher requested. Display an appropriate message. Please enter the size of each group? Write the statement to calculate the number of groups of groupSize. Write the statement to calculate the number of pupils who are in the remaining smaller group


The user should enter the following values: Gross monthly income (before deductions) Estimated monthly tax deducted,Estimated monthly expenditures in each of the following categories,Groceries,Water and lights Travel costs (including petrol),Cell phone and telephone,Other expenses. The user shall be able to choose between renting accommodation or buying a property. 3. If the user selects to rent, the user shall be able to enter the monthly rental amount. 4. If the user selects to buy a property, the user shall be required to enter the following values for a home loan: a. Purchase price of the property b. Total deposit c. Interest rate % d. Number of months to repay (between 240 and 360) 5. The software shall calculate the monthly home loan repayment for buying a property based on the values that the user entered If the monthly home loan repayment is more than a third of the user’s gross monthly income, the software shall alert the user that approval of the home loan is unlikely. NB:MAKE USE OF GENERIC CLASSES


You are requested to write a very simple calculator. Your calculator should be able to handle the five basic mathematic operations – add, subtract, multiply, divide and modulus – on two input values. Your program should have the following structure: • Ask the user to enter two float variables named var1 and var2 • Ask the user to enter a character variable named operation to represent the operation to be performed on the two variables. • Perform the appropriate operation by using if-statements • The output must be given in fixed-point notation with two digits after the decimal point.


You will continue working on the application created in Part 1. Implement the feedback provided by your lecturer on Part 1 before continuing with Part 2. Marks will be awarded for this (10%).



The application must still perform all the functions from Part 1, with the following features added: 1.



The user shall be able to choose whether to buy a vehicle.



2.



If the user selects to buy a vehicle, the user shall be required to enter the following values



for vehicle financing:



a. Model and make. b. Purchase price.



c. Total deposit.



d. Interest rate (percentage).



e. Estimated insurance premium.



3.



The software shall calculate the total monthly cost of buying the car (insurance plus loan



repayment). Assume that all cars will be repaid over a period of five years.



4. The software shall notify the user when the total expenses exceed 75% of their income,



including loan repayments.



Display the expenses to the user in descending order by value.

Write a program to overload the expression (ob1*ob2) %ob3. Where ob1, ob2 and ob3 are the objects of a class. Assume 2 number of integer data members in the class.


Machine 8


Reducing Fraction to Lowest Term


Create a Python script that will reduce an input fraction to its lowest term.


Program Requirements:


1. Define a function that will check first if the input fraction is a VALID fraction.


2. Define a function that will split a VALID fraction and return a list that consists the numerator and denominator.


3. Define a function that will accept two parameters (numerator and denominator to determine the greatest common divisor.


4. Define a function that will accept two parameters (numerator, denominator) and will return the reduced fraction.


Sample Output:


Input a fraction: 4/6


Reduced fraction is 2/3

Kaye Keith C. Ruden


Machine Problem 3


Reducing Fraction to Lowest Term


Create a Python script that will reduce an input fraction to its lowest term.


Program Requirements:


1. Define a function that will check first if the input fraction is a VALID fraction.


2. Define a function that will split a VALID fraction and return a list that consists the numerator and denominator.


3. Define a function that will accept two parameters (numerator and denominator to determine the greatest common divisor.


4. Define a function that will accept two parameters (numerator, denominator) and will return the reduced fraction.


Sample Output:


Input a fraction? 5/0


Invalid fraction

Kaye Keith C. Ruden


Machine Problem 3


Reducing Fraction to Lowest Term


Create a Python script that will reduce an input fraction to its lowest term.


Program Requirements:


1. Define a function that will check first if the input fraction is a VALID fraction.


2. Define a function that will split a VALID fraction and return a list that consists the numerator and denominator.


3. Define a function that will accept two parameters (numerator and denominator to determine the greatest common divisor.


4. Define a function that will accept two parameters (numerator, denominator) and will return the reduced fraction.


Sample Output 1:


Input a fraction: 4/6


Reduced fraction is 2/3

Make a class named Fruit with a data member to calculate the number of fruits in a basket. Create twoother class named Apples and Mangoes to calculate the number of apples and mangoes in the basket.Print the number of fruits of each type and the total number of fruits in the basket. c#


LATEST TUTORIALS
APPROVED BY CLIENTS