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.
***Given a class called Student and a class called Course that contains an ArrayList of Student....
***Given a class called Student and a class called Course that contains an ArrayList of Student. Write a method called dropStudent() as described below. Refer to Student.java below to learn what methods are available.*** Course.java import java.util.*; import java.io.*; /****************************************************** * A list of students in a course *****************************************************/ public class Course{ /** collection of Students */ private ArrayList<Student> roster; /***************************************************** Constructor for objects of class Course *****************************************************/ public Course(){ roster = new ArrayList<Student>(); } /***************************************************** Remove student with the...
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
Using Python Define a Student class. A Student class needs to have two attributes, the student_name...
Using Python Define a Student class. A Student class needs to have two attributes, the student_name and strudent_grade . It also has three methods as follows: set_grade(grade) that sets the grade of the student. get_grade returns the grade of the student. print_student_info that print the name and grade of student in a formatted string. In the math_utils.py file define a function called average_grade(roster) . This method accepts as input a list of Student Objects and returns the average of the...
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...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT