下面是我要完成的"rhombus.cpp“文件的代码。但首先我要强调这个区域“菱形::菱形(顶点点,整数半径):形状(点){”。我的问题是,在编译器中,到底发生了什么?形状(点)对我来说是全新的,所以我不知道该做什么,特别是当我要在int main中调用它时。如果我在//的注释下放置了代码并添加注释等等,那么我所做的事情是正确的吗?非常感谢您的帮助!
#include "rhombus.h"
Rhombus::Rhombus(Vertex point, int radius) : Shape(point){
// constructs a Rhombus of rad
我更愿意这样写:
Lists.transform(vals,
new Function<>() {
public List<ValEntry> apply(Validator<? super T> input) {
return input.validate(value);
}
});
...than此命令:
Lists.transform(vals,
new Function<Validator<? super T>, List<ValEntry>
我有一个类型为patient_class的数组列表,该数组列表的类型已经用黄色加了下划线,并且集成开发环境提到了“新表达式中的冗余类型参数(改为使用菱形运算符)”。
我的问题是:我应该使用菱形运算符吗?这是必须的吗?在将记录存储到数组列表时,我会遇到任何数据丢失或任何其他问题吗?
下面是我的数组列表:
public class Register_newpatient extends javax.swing.JFrame {
public Register_newpatient() {
initComponents();
groupbutton();