Class Assignment Number: One

OBJECT ORIENTED PROGRAMMING
Submission Format: Print out on A4 size blank paper
Problem One:
Create a structure employee having three variables to store ID, Name and Salary.
Create two variables of employee type in main(), get the input from user and then
display them
Problem Two:
Create a structure Distance having two members for feet (type int) and inches (type
float). Create another structure Room having two members for length and width
(both of type Distance). Create two variables of Room type in main(), get the input
from the user, and display them
Problem Three:
Create a structure point having two variables; one for storing x-coordinate another to
store y-coordinate. Create two variables of point type in main() and get the input
from the user. Write a function that receives two variables of point type, add the
corresponding x-coordinates and y-coordinates and display the resultant point.
Post A Comment
  • Blogger Comment using Blogger
  • Facebook Comment using Facebook
  • Disqus Comment using Disqus

No comments :