Java程序辅导

C C++ Java Python Processing编程在线培训 程序编写 软件开发 视频讲解

客服在线QQ:2653320439 微信:ittutor Email:itutor@qq.com
wx: cjtutor
QQ: 2653320439
Chapter 4 
Lab 1 
 
Demonstrating Scope Pages 186 – 188  
Overloading Methods Pages 193 – 194 
Creating Overloaded Constructors Pages 199 – 201  
Using the this Reference to Make Constructors More Efficient Pages 207 – 208 
 
Instructions: 
 
This lab is made up of multiple assignments from the book.  Make the following changes to 
the instructions shown in your text book: 
 
Creating a static Method that Requires No Arguments and Returns No Values  
Page 186 – Step 1 
 Name your class DemoBlock_YourInitials  
o Throughout the rest of this book you will need to add _YourInitials to the end of 
all class names you create when working with the You Do It exercises. 
 
Creating Overloaded Constructors 
Page 200 – Step 7 
 Do not create a new project or package for this class.   
 Your class is named CarInsurancePolicy_YourInitials so you need to modify the source 
code appropriately. 
o Throughout the rest of this book you will need to add _YourInitials to the end of 
all class names you create when working with the You Do It exercises. 
 
Using the this Reference to Make Constructors More Efficient  
Page 207 – Step 1 
 Create a copy of the CarInsurancePolicy_YourInitials.java file named 
CarInsurancePolicy2_YourInitials 
o Throughout the rest of this book you will need to add _YourInitials to the end of 
all class names you create when working with the You Do It exercises 
 
Turn in the files DemoBlock_YourInitials.java, DemoOverload_YourInitials.java, 
CarInsurancePolicy_YourInitials.java, CreatePolicies_YourInitials.java, 
CarInsurancePolicy2_YourInitials.java, and CreatePolicies2_YourInitials.java 
 
 
Grading: 
 
2 – General, compiles, comments, proper indentation, etc 
2 – DemoBlock_YourInitials.java code 
2 – DemoOverload_YourInitials.java code 
2 – CarInsurancePolicy_YourInitials.java code 
2 – CreatePolicies_YourInitials.java code 
2 – CarInsurancePolicy2_YourInitials.java code 
2 – CreatePolicies2_YourInitials.java code