Homework Help Global logo
  • Home
  • Coursework Help
  • Dissertation Help
  • Homework Help
  • My account
  • Order now
Order Now
Homework Help

Object-oriented programming | Computer Science homework help

2 min read
Posted on 
December 3rd, 2021
Home Homework Help Object-oriented programming | Computer Science homework help

   

Overview: 

In this assignment, you will be analyzing the basic concepts for object-oriented programming, how to create classes that contain attributes and different types of methods. 

Instructions: 

Answer the following questions: 

1. Discuss the rationale behind restricting access to object attributes and requiring class users to only access attributes using methods. Explain how private access restricts outside class users from directly accessing attributes (and methods). In contrast, public access specifies that an outside class may use a method (or attribute) of the class. 

2. Describe the benefits of encapsulation and information hiding also called data hiding. As applied to objects, this means that outside objects should not be able to alter an object’s attributes but should instead interact with the object via methods. 

3. Define the terms instance variable, field, and state. Explain how class methods are shared by all objects of a class. 

4. Discuss how a class client, or class user, can use a class that has been written by another programmer. 5. Create a class diagram of one or more classes that would support a simple online library catalog. 

6. Write pseudocode class definitions of one or two of the classes created in the previous exercise. 

7. When a class contains objects of another class, the relationship is called a whole-part relationship or composition. The relationship created is also called a has-a relationship. Discuss some of the possible issues with composition, such CIS216 – Programming Principles Object-Oriented Programming as the long statement: output sales.getHighestPaidEmployee().getHireDate().getYear().

8. Describe the rules that govern the attributes of a parent class that can be accessed by a child class and the reverse 

9. Discuss the advantages of using inheritance and why superclass code is considered more reliable. 10.Research how a derived class can access the constructor of its parent class. 

11.Research the topic of multiple inheritance. Describe this concept and explain how it is commonly used in object-oriented programming languages. 

12.Create a try–catch block to accept a birth date, entered separately as month, day, and year. Included should be checks for month (1–12), day (28, 29 [if you dare], 30, and 31 days), and year (<= this year). 

Requirements: 

• Show your work in a Word document. 

o Include all your work for each question. 

o You can include screenshots of work done on paper. 

Order an Essay Now & Get These Features For Free:

Turnitin Report

Formatting

Title Page

Citation

Outline

Place an Order
Share
Tweet
Share
Tweet
Calculate the price
Pages (275 words)
$0.00
Homework Help Global
Company
  • Coursework Help
  • Law Homework Help
  • Business Paper Help
  • Thesis Writing Help
Legal
  • Dissertation Help
  • Homework Help
  • Essay Writing
  • Custom Writing
How Our Service is Used:
Homework Help Global essays are NOT intended to be forwarded as finalized work as it is only strictly meant to be used for research and study purposes. Homework Help Global does not endorse or condone any type of plagiarism.
Subscribe
No Spam
© 2023 Homework Help Global. All rights reserved.
Homework Help Global will be listed as ‘Homework Help Global’ on your bank statement.