Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

public class Csc20Student extends CsusStudent{ private boolean preComputeMajor; private int numberOfComputerClassUnits ; public Csc20Student(String name, int id, String address, String phone, String email,boolean preCsMajor, int

public class Csc20Student extends CsusStudent{

private boolean preComputeMajor;

private int numberOfComputerClassUnits ;

public Csc20Student(String name, int id, String address, String phone, String email,boolean preCsMajor, int csUnits)

{

super();

}

public boolean getPreComputerMajor() {

}

public void setPreComputerMajor (boolean value) {

}

public int getNumberofCsUnits() {

}

public void setNumberofCsUnits (int units) {

}

public String toString () {

}

}

-----------------------------------------------------------------------------------------

public class CsusStudent {

private String studentName;

private int studentId;

private String studentAddress;

private String studentPhone;

private String studentEmail;

public CsusStudent(String newName, int newId, String newAddress, String newPhone_number, String newEmail) {

}

public void setName(String newName) {

}

public String getName() {

}

public void setID(String newID) {

}

public String getID() {

}

public void setAddress(String newAddress)

{

}

public String getAddress() {

}

public void setPhone(String newPhone_number) {

}

public String getPhone(){

}

public void setEmail(String newEmail){

}

public String getEmail() {

}

public String toString () {

}

}

------------------------------------------------------------------------------------

import org.junit.Assert;

import static org.junit.Assert.*;

import org.junit.Before;

import org.junit.Test;

public class CsusStudentTest {

CsusStudent instance;

Csc20student instance2;

public void setUp() {

instance = new CsusStudent("John Doe", 123, "123 Somewhere", "415-555-1212", "johndoe@somewhere.com");

instance2 = new Csc20Student("John Doe", 123, "123 Somewhere", "415-555-1212", "johndoe@somewhere.com",true,15);

instance = instance2;

}

public void testGetName() {

String expResult = "John Doe";

String result = instance.getName();

assertEquals(expResult, result);

}

public void testgetAddress() {

String expResult = "123 Somewhere";

String result = instance.getAddress();

assertEquals(expResult, result);

}

public void testgetPhone() {

String expResult= "415-555-1212";

String result = instance.getPhone();

assertEqual(expResult, result);

}

public void testgetEmail() {

String expResult="johndoe@somewhere.com";

String result = instance.getEmail();

assertEquals(expResult, result);

}

}

------------------------------------------------------------------------

public class Lab5Tester {

public static void main(String[] args) {

CsusStudent student = new CsusStudent("John Doe", 123, "123

Somewhere", "415-555-1212", "johndoe@somewhere.com");

Csc20Student csc20Student = new Csc20Student("John Doe", 123, "123

Somewhere", "415-555-1212", "johndoe@somewhere.com",true,15);

System.out.println(student + " ");

System.out.println(csc20Student + " ");

}

}

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

Step: 3

blur-text-image

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

Transactions On Large Scale Data And Knowledge Centered Systems Iv Special Issue On Database Systems For Biomedical Applications Lncs 6990

Authors: Abdelkader Hameurlain ,Josef Kung ,Roland Wagner ,Christian Bohm ,Johann Eder ,Claudia Plant

2011th Edition

3642237398, 978-3642237393

More Books

Students also viewed these Databases questions

Question

Describe the three causes of social loafing.

Answered: 1 week ago

Question

2. Develop a persuasive topic and thesis

Answered: 1 week ago

Question

1. Define the goals of persuasive speaking

Answered: 1 week ago