1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Anni [7]
3 years ago
9

For this assignment you will create two student objects and then print out the objects values. Within the Student Class you will

have the following properties: StudentID LastName FirstName Major Within the Main you will create 2 student objects by setting each of their property values. You will then write out a header line and each of the student objects to the console.
Engineering
2 answers:
kenny6666 [7]3 years ago
8 0

Answer:

public class Student { private String studentMajor; private String firstName; private String lastName; private int studentCredits; private int studentPoints;

Explanation:

public class Student { private String studentMajor; private String firstName; private String lastName; private int studentCredits; private int studentPoints;

alisha [4.7K]3 years ago
3 0

Answer:

// Student class is defined

public class Student{

// student properties is defined

int studentID;

String firstName;

String lastName;

String major;

// student constructor is defined

public Student(int studentIdentity, String fName, String lName, String studentMajor){

studentID = studentIdentity;

firstName = fName;

lastName = lName;

major = studentMajor;

}

// setter method for studentID

public void setStudentID(int studentIdentity){

   studentID = studentIdentity;

}

// setter method for firstName

public void setFirstName(String fName){

   firstName = fName;

}

// setter method for lastName

public void setLastName(String lName){

lastName = lName;

}

// setter method for major

public void setMajor(String studentMajor){

major = studentMajor;

}

// getter method for studentID

public int getStudentID(){

   return studentID;

}

// getter method for firstName

public String getFirstName(){

return firstName;

}

// getter method for lastName

public String getLastName(){

return lastName;

}

// getter method for major

public String getMajor(){

return major;

}

// displayMessage method to display class property in a better format

public void displayMessage(){

System.out.printf("The detail of students is shown below:\nThe name of the student is: %s %s!\nThe major is: %s.", getFirstName(), getLastName(), getMajor());

}

}

// main class for student is defined

public class StudentMain{

   // main method that signify beginning of program execution

   public static void main(String[] args) {

// object of Student is created

       Student student1 = new Student(1111, "John", "Smith", "Computer Science");

       Student student2 = new Student(1234, "Joe", "Doe", "Literature");

// the object is displayed by called displayMessage method

       student1.displayMessage();

       student2.displayMessage();

   }

}

Explanation:

The code is written in Java and well commented. It contains two class. The first section is Student.java and the second section is the StudentMain.java; it contains the main method which begins program execution.

You might be interested in
An angle is observed repeatedly using the same equipment and procedures producing the data below:35 ∘ 40'00",35 ∘ 40'10",35 ∘ 40
Helen [10]

Answer: (a) +/- 7.5° (b) +/- 3.75°

Explanation:

See attachment

6 0
3 years ago
Locate the centroid y¯ of the composite area. Express your answer to three significant figures and include the appropriate units
german

Answer:

Please see the attached Picture for the complete answer.

Explanation:

4 0
3 years ago
Can anyone help me ?
MrRa [10]
That’s too hard for me lol oof
3 0
3 years ago
The exhaust steam from a power station turbine is condensed in a condenser operating at 0.0738 bar(abs). The surface of the heat
lozanna [386]

Answer:

Percentage change 5.75 %.

Explanation:Given ;

Given

 Pressure of condenser =0.0738 bar

Surface temperature=20°C

Now from steam table

Properties of steam at 0.0738 bar  

Saturation temperature corresponding to saturation pressure =40°C      

 h_f= 167.5\frac{KJ}{Kg},h_g= 2573.5\frac{KJ}{Kg}

So Δh=2573.5-167.5=2406 KJ/kg

Enthalpy of condensation=2406 KJ/kg

So total heat=Sensible heat of liquid+Enthalpy of condensation

Total\ heat\ =C_p\Delta T+\Delta h

Total heat =4.2(40-20)+2406

Total heat=2,544 KJ/kg

Now film coefficient before inclusion of sensible heat

  h_1=\dfrac{\Delta h}{\Delta T}

  h_1=\dfrac{2406}{20}

h_1=120.3\frac{KJ}{kg-m^2K}

Now film coefficient after inclusion of sensible heat

 h_2=\dfrac{total\ heat}{\Delta T}

 h_2=\dfrac{2,544}{20}

h_2=127.2\frac{KJ}{kg-m^2K}

So\ Percentage\ change=\dfrac{h_2-h_1}{h_1}\times 100

             =\dfrac{127.2-120.3}{120.3}\times 100

                   =5.75 %

So Percentage change 5.75 %.

3 0
3 years ago
In a manufacturing facility, 2-in-diameter brass balls (k = 64.1 Btu/h·ft·°F, rho = 532 lbm/ft^3, and cp = 0.092 Btu/lbm·°F) ini
bekas [8.4K]

Answer:

Explanation:

First we compute the characteristic length and the Biot number to see if the lumped parameter

analysis is applicable.

Since the Biot number is less than 0.1, we can use the lumped parameter analysis. In such an

analysis, the time to reach a certain temperature is given by the following

From the data in the problem we can compute the parameter, b, and then compute the time for

the ratio (T – T)/(Ti

– T)

4 0
4 years ago
Read 2 more answers
Other questions:
  • The ratio of the weight of a substance to the weight of equal volume of water is known as a) Density b) specific gravity c) spec
    8·1 answer
  • Volume of sale (i.e., the number of parts sold) is a factorwhen determining which
    8·1 answer
  • A contractor needs to excavate 50,000 yd3 of silty clay and haul it with Caterpillar 69C dump trucks. Each truck can carry 30.9
    13·1 answer
  • In the fully developed region of flow in a circular pipe, does the velocity profile change in the flow direction?
    6·1 answer
  • A subsurface exploration report shows that the average water content of a fine-grained soil in a proposed borrow area is 22% and
    9·1 answer
  • Compute the thermal efficiency for an ideal gas turbine cycle that operates with a pressure ratio of 6.75 and uses helium gas.
    12·1 answer
  • Lagest organs of the human body
    6·2 answers
  • An astronomer of 65 kg of mass hikes from the beach to the observatory atop the mountain in Mauna Kea, Hawaii (altitude of 4205
    15·1 answer
  • 1: asha started abusness with 30.000
    8·1 answer
  • Differences between acidic and basic Bessemer process​
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!