- 1、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。。
- 2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 3、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
- 4、该文档为VIP文档,如果想要下载,成为VIP会员后,下载免费。
- 5、成为VIP后,下载本文档将扣除1次下载权益。下载后,不支持退款、换文档。如有疑问请联系我们。
- 6、成为VIP后,您将拥有八大权益,权益包括:VIP文档下载权益、阅读免打扰、文档格式转换、高级专利检索、专属身份标志、高级客服、多端互通、版权登记。
- 7、VIP文档为合作方或网友上传,每下载1次, 网站将根据用户上传文档的质量评分、类型等,对文档贡献者给予高额补贴、流量扶持。如果你也想贡献VIP文档。上传文档
查看更多
Liang, Introduction to Java Programming, Eighth Edition, (c) 2011 Pearson Education, Inc. All rights reserved. 0132130807 Chapter 8 Objects and Classes Motivations After learning the preceding chapters, you are capable of solving many programming problems using selections, loops, methods, and arrays. However, these Java features are not sufficient for developing graphical user interfaces and large scale software systems. Suppose you want to develop a graphical user interface as shown below. How do you program it? Objectives To describe objects and classes, and use classes to model objects (§8.2). To use UML graphical notations to describe classes and objects (§8.2). To demonstrate defining classes and creating objects (§8.3). To create objects using constructors (§8.4). To access objects via object reference variables (§8.5). To define a reference variable using a reference type (§8.5.1). To access an object’s data and methods using the object member access operator (.) (§8.5.2). To define data fields of reference types and assign default values for an object’s data fields (§8.5.3). To distinguish between object reference variables and primitive data type variables (§8.5.4). To use classes Date, Random, and JFrame in the Java library (§8.6). To distinguish between instance and static variables and methods (§8.7). To define private data fields with appropriate get and set methods (§8.8). To encapsulate data fields to make classes easy to maintain (§8.9). To develop methods with object arguments and differentiate between primitive-type arguments and object-type arguments (§8.10). To store and process objects in arrays (§8.11). OO Programming Concepts Objects Classes Classes UML Class Diagram Example: Defining Classes and Creating Objects Objective: Demonstrate creating objects, accessing data, and using methods. Example: Defining Classes and Creating Objects Objective: Demonstrate creating objects, accessing data, and using methods. Constructors Circle() { } Circle
您可能关注的文档
最近下载
- 工商业储能电站项目安全培训课件.pptx VIP
- 血液科护士的疑难病例分析与护理经验.pptx VIP
- 《新时代高校劳动教育理论与实践教程》教案 第10课 勤于家政:除尘垢,净身心.docx VIP
- 企业会计准则讲解课件.pptx VIP
- 民航安全检查员.doc VIP
- 《制作生日蜡烛》优教课件.ppt VIP
- 《植物需要什么》教案-2025-2026学年粤教粤科版(2024)小学科学三年级上册.docx VIP
- 2025年贵阳水务集团有限公司人员招聘笔试备考题库.docx VIP
- 建筑施工企业安全责任清单模板.pdf VIP
- 5G时代移动通信基站建设问题及解决对策现状及未来发展趋势.doc VIP
文档评论(0)