Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

2) OK, now that you have some instance variables for your Student class, create this class in NetBeans. Create a new project called University Driver.

image text in transcribed
2) OK, now that you have some instance variables for your Student class, create this class in NetBeans. Create a new project called University Driver. Make sure the Create Mai Class box is checked and click Finish. 3) NetBeans will create a universitydriver package and openi University Driver.java source code file. 4) Expand the University Driver project, right-click the Source Packages icon, click New, then click Java Class. In the popup, name your class Student in the Class Name box). Click the Package dropdown arrow and select universitydriver. Click Finish. Java creates this class, add it to the universitydriver package, and opens the Student.jav source code file. 5) The contents of the Student class are everything from the rig of the opening curly brace that follows the word Student the left of the closing curly brace two lines below. Those tv curly braces define what's known as a block. Everything inside this block defines the Student class. One thing to get used to is that many Java constructs come in opening and closing pairs like parentheses and curly braces { }. Having a starting curly brace without a corresponding closi one or a closing one without the corresponding starting one will cause an error. It's easy to do when writing large amounts of code. To avoid this, if I type an opening parenthesis or curly brace I IMMEDIATELY type the corresponding closing one (NetBeans does this for you automatically). Then I set my cursor back between the two and carry on. Mark my words, you're going to hate yourse when you get one of these errors after you've written a coup of hundred lines of code and have to find the single parenthesis or curly brace that's not matched properly. 6) Now start adding instance variable definitions to your Stude class. Click the blank line below public class Stude 1. Type one line of code for each of the Instance variables i your instance variables table above. In Java, variables defined at the class level are called fields. To enter a field definition, type the datatype first then the identifier then a semicolon. For example, the definition for the firstName fi would look like this

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Design Application Development And Administration

Authors: Mannino Michael

5th Edition

0983332401, 978-0983332404

More Books

Students also viewed these Databases questions