Click here to Skip to main content
15,882,017 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
Create a windows application project 'CurrentBudget' in a solution 'Budgeting'.
Add a class library project 'BudgetLib' to the same solution 'Budgeting"

In the BudgetLib project

1. Define an interface IExpense with the following get properties: Amount, DateExpenseMade, and Description.
2. Define a class Expense that, inherits from IExpense, with private fields: _amount, _dateExpenseMade, and short description. Add constructors and necessary properties, and method.
3. Define an abstract class Budget with private fields: _balance, _budgetCode, _dateItExpires, and a list of expenses (such as: List<iexpense> _expenses).
4. Add constructor (it should not include a parameter for _expenses), properties and methods: virtual AddExpense method, which should take a single parameter: amount. This method should add an expense to the _expenses list and decrease the budget balance, making sure there are enough funds in the budget.
Add an abstract method GeBudgetData().
Within child class, This method is to return a string containing all the data pertaining to the child class.

5. Define a class BusinessBudget that inherits (polymorphic inheritance) from Budget. the BusinessBudget class should define an extra private field: _department

6. Define a class HomeBudget that inherits (polymorphic inheritance)from Budget, this class should define an extra field _category (such as: Food, Clothing, Cleaning, Entertainment, etc…)

In Form1:
7. Define a List of budgets

8. Define a Dictionary of budgets, using the budgetCode as the key
9. In Form1_Load create at least 3 BussinessBudget objects and at least 3 HomeBudget objects. Add all to the budget dictionary and to the list of budget
10. Sort the list by balance
11. In Form1[Design], add a button and a display control (richtextbox)
12. Attach code to the button to display all the budgets in the budget list.
13. Add gui to request budgetcode from user, then use the dictionary to get the budget object with the given code and display it.
14. Request an integer from user (0 to 255) best to use the byte type. Display its binary equivalent value.
15. Write a statement to set the fourth bit (bit3) to 1, display it

16. Write a statement to set the sixth bit (bit5) to 0, display it

17. Write an if statement to check if bit4 is set to 1

What I have tried:

yes I did but to verify my coding.
Updated 2-May-18 20:09pm

This is object oriented programing C# (C sharp)

Yes, that's it !
yes I did but to verify my coding.

And you have a question ?

So, you show no attempt to solve the problem yourself, you have no question, you just want us to do your HomeWork.
HomeWork problems are simplified versions of the kind of problems you will have to solve in real life, their purpose is learning and practicing.
We do not do your HomeWork.
HomeWork is not set to test your skills at begging other people to do your work, it is set to make you think and to help your teacher to check your understanding of the courses you have taken and also the problems you have at applying them.
Any failure of you will help your teacher spot your weaknesses and set remedial actions.
Any failure of you will help you to learn what works and what don't, it is called 'trial and error' learning.
So, give it a try, reread your lessons and start working. If you are stuck on a specific problem, show your code and explain this exact problem, we might help.
Share this answer
When you posted this question yesterday: C# object oriented programing[^] you were told: we don;t do your homework for you.
That has not changed in 24 hours ... nor will it.

Get off your ass, knuckle down, and give it a try: you are running out of time before you need to submit this, and you are spending more time and effort in a fruitless and futile attempt to get others to do it for you than you would have expended actually doing it yourself...
Share this answer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900