Using C#, write a program that has two classes,
AdApp and ClassifiedAd. The
program does the following:
1) AdApp contains the Main() and
ClassifiedAd is the object class.
2) The ClassifiedAd has three automatic
properties, Category, Words, and
Price. Price is calculated in
Main() from the unit price of $0.09/word. The
class does not have any methods.
3) The Main() instantiate two objects of the
ClassfiedAd class with the following
information:
4) Afterward, the program displays the two object information
from the Main(), making use of the object
properties.
Sample output (Microsoft Visual Studio) as
shown below:
The classified ad with 120 words in category Food costs $10.80 The classified ad with 200 words in category Automobile costs $18.00 Press any key to continue
Using C#, write a program that has two classes, AdApp and ClassifiedAd. The program does the following: 1) AdApp contain
-
answerhappygod
- Site Admin
- Posts: 899604
- Joined: Mon Aug 02, 2021 8:13 am
Using C#, write a program that has two classes, AdApp and ClassifiedAd. The program does the following: 1) AdApp contain
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!