Define a class Computer having the following description Data members: modelno – Model number (data type String) processor – Name of the Processor (data type String) memorycap – Memory capacity in Bytes (data type long) member methods: displayData()- a method to display information. updateData()- a method to get new values and update the data members. You don’t need to write main () method.
Answers
Answer:
Computer Applications
Define a class Discount having the following description:
Data Members Purpose
int cost to store the price of an article
String name to store the customer's name
double dc to store the discount
double amt to store the amount to be paid
Member functions Purpose
void input() Stores the cost of the article and name of the customer
void cal() Calculates the discount and amount to be paid
void display() Displays the name of the customer, cost, discount and amount to be paid
Write a program to compute the discount according to the given conditions and display the output as per the given format.
List Price Rate of discount
Up to ₹5,000 No discount
From ₹5,001 to ₹10,000 10% on the list price
From ₹10,001 to ₹15,000 15% on the list price
Above ₹15,000 20% on the list price
Output:
Name of the customer Discount Amount to be
Answer:
A subordinate clause is a clause that cannot stand alone as a complete sentence; it merely complements a sentence's main clause, thereby adding to the whole unit of meaning.