Question

In: Computer Science

a. In the statement Dim newStudent As Student, which is the class and which is the...

a. In the statement Dim newStudent As Student, which is the class and which is the object variable?

b. Look at the following problem description and identify the potential classes.

We need to keep a list of customers and record our business transactions with them. Each time a customer purchases a product, an order is filled out. Each order shows a list of items kept in our central warehouse.

Solutions

Expert Solution

a) In the statement Dim newStudent As Student,

Class - Student

object variable - newStudent

b) Potential classes.

TA two step process creates an instance of a class.Declare a variable whose type is the class
Create instance of the class with New keyword and assign the instance to the variable
New_Customer defined here as an object variable Can accomplish both steps in one statement.
Dim New_Customer As New Customer()


Related Solutions

Dim Digit1 As Double Dim Digit2 As Double Dim Digit3 As Double Dim Digit4 As Double...
Dim Digit1 As Double Dim Digit2 As Double Dim Digit3 As Double Dim Digit4 As Double Dim Digit5 As Double Digit1 = ((txtboxInput.Text) Mod 100000) / 10000 Digit2 = ((txtboxInput.Text) Mod 10000) / 1000 Digit3 = ((txtboxInput.Text) Mod 1000) / 100 Digit4 = ((txtboxInput.Text) Mod 100) / 10 Digit5 = (txtboxInput.Text Mod 10) lblDigit1.Text = Math.Truncate(Digit1) lblDigit2.Text = Math.Truncate(Digit2) lblDigit3.Text = Math.Truncate(Digit3) lblDigit4.Text = Math.Truncate(Digit4) lblDigit5.Text = Math.Truncate(Digit5) End Sub Private Sub txtboxInput_TextChanged(sender As Object, e As EventArgs) Handles txtboxInput.TextChanged...
Create a class called Student which stores • the name of the student • the grade...
Create a class called Student which stores • the name of the student • the grade of the student • Write a main method that asks the user for the name of the input file and the name of the output file. Main should open the input file for reading . It should read in the first and last name of each student into the Student’s name field. It should read the grade into the grade field. • Calculate the...
A first-year accounting student is confused by a statement made in a recent class. The instructor...
A first-year accounting student is confused by a statement made in a recent class. The instructor stated that assets listened in the balance sheet of IBM Corporation include computers that are classified as current assets as well as computers that classified as long-term (noncurrent) assets. In addition, the instructor stated that investments in equity securities of other corporations could be classified in the balance sheet as either current or long-term assets. Explain to the student the distinction between current and...
Let U be a subspace of V . Prove that dim U ⊥ = dim V...
Let U be a subspace of V . Prove that dim U ⊥ = dim V −dim U.
1- A student at UHD heard the following statement made about the Business Cornerstone class. "Oh...
1- A student at UHD heard the following statement made about the Business Cornerstone class. "Oh no!--that teacher is BORING!" Susie realized that this statement does not meet the intellectual standard of __________ and asked more questions before making her mind up about taking that teacher. accuracy significance precision relevance 2- Based on the information you learned in Blackboard on resumes, you should only go back approximately 10 years in listing jobs on your resume. True False 3- All reasoning...
The nurse is teaching a class on addiction. Which statement by one of the participates in...
The nurse is teaching a class on addiction. Which statement by one of the participates in the class indicates a need for further teaching? a) Addictive drugs produce dopamine release in similar amounts to the normally released in reward circuit b) Overtime the brain will develop reduced responses to many addictive drugs c) With the use of drug overtime the brain will undergo synaptic remodelling d) Changes in neurons after chronic drug use leads to feelings of depression
A Java question. You are given a Student class. A Student has a name and an...
A Java question. You are given a Student class. A Student has a name and an ArrayList of grades (Doubles) as instance variables. Write a class named Classroom which manages Student objects. You will provide the following: 1. public Classroom() a no-argument constructor. 2. public void add(Student s) adds the student to this Classroom (to an ArrayList 3. public String hasAverageGreaterThan(double target) gets the name of the first student in the Classroom who has an average greater than the target...
Write a class encapsulating the concept of a Student, assuming that the Student has the following...
Write a class encapsulating the concept of a Student, assuming that the Student has the following attributes: the name of the student, the average of the student, and the student’s GPA. Include a default constructor, an overloaded constructor, the accessors and mutators, and methods toString() and equals(). Also include a method returning the letter grade base on the following range for the average: Average Range Letter Grade 90-100 A 85-89   B+ 80-84 B 75-79 C+ 70-74 C 65-69 D+ 60-64...
Write a class encapsulating the concept of a Student, assuming that a student has the following...
Write a class encapsulating the concept of a Student, assuming that a student has the following attributes: last name, first name, id, array of grades. Include a constructor, the accessors and mutators, and method toString. Also code the following methods: one returning the GPA using the array of grades (assuming each grade represents a course grade and all courses have the same number of credit hours) and a method to add a course grade to the array of grades (this...
Suppose that a student in this class uses their personalized class data set to test the...
Suppose that a student in this class uses their personalized class data set to test the hypothesis that more than 50% of the people in this class are in Business, and rejects the null hypothesis at the 2% significance level. Consider the following statements. (i) The p-value is greater than .02. (ii) If another student in this class tested the same hypothesis with their personalized class data set, using the same significance level, then that student might not reject the...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT